[tor-commits] [tor/master] Fix a Rust compilation warning; resolve bug 33212.

nickm at torproject.org nickm at torproject.org
Mon Feb 10 19:17:26 UTC 2020


commit 99d044d553c08d3b2900dbca30199083067515b2
Author: Nick Mathewson <nickm at torproject.org>
Date:   Mon Feb 10 13:32:09 2020 -0500

    Fix a Rust compilation warning; resolve bug 33212.
---
 changes/ticket33212           | 4 ++++
 src/rust/protover/protover.rs | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/changes/ticket33212 b/changes/ticket33212
new file mode 100644
index 000000000..aeb09e0c6
--- /dev/null
+++ b/changes/ticket33212
@@ -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.
diff --git a/src/rust/protover/protover.rs b/src/rust/protover/protover.rs
index 2661d811c..06fdf56c6 100644
--- a/src/rust/protover/protover.rs
+++ b/src/rust/protover/protover.rs
@@ -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;





More information about the tor-commits mailing list