]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix a Rust compilation warning; resolve bug 33212.
authorNick Mathewson <nickm@torproject.org>
Mon, 10 Feb 2020 18:32:09 +0000 (13:32 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 10 Feb 2020 18:32:09 +0000 (13:32 -0500)
changes/ticket33212 [new file with mode: 0644]
src/rust/protover/protover.rs

diff --git a/changes/ticket33212 b/changes/ticket33212
new file mode 100644 (file)
index 0000000..aeb09e0
--- /dev/null
@@ -0,0 +1,4 @@
+  o Minor bugfixes (rust, build):
+    - Fix a syntax warning given by newer versions of Rust, and creating
+      problems for our continuous integration.
+      Fixes bug 33212; bugfix on 0.3.5.1-alpha.
index 2661d811c43cb4cda9abc4bae6b4c11aecb3cae1..06fdf56c69062a739b45042083224d97953af404 100644 (file)
@@ -26,7 +26,7 @@ const FIRST_TOR_VERSION_TO_ADVERTISE_PROTOCOLS: &'static str = "0.2.9.3-alpha";
 /// before concluding that someone is trying to DoS us
 ///
 /// C_RUST_COUPLED: protover.c `MAX_PROTOCOLS_TO_EXPAND`
-const MAX_PROTOCOLS_TO_EXPAND: usize = (1 << 16);
+const MAX_PROTOCOLS_TO_EXPAND: usize = 1 << 16;
 
 /// The maximum size an `UnknownProtocol`'s name may be.
 pub(crate) const MAX_PROTOCOL_NAME_LENGTH: usize = 100;