Fix a Rust compilation warning; resolve bug 33212.

This commit is contained in:
Nick Mathewson 2020-02-10 13:32:09 -05:00
parent 41d52e9cd8
commit 99d044d553
2 changed files with 5 additions and 1 deletions

4
changes/ticket33212 Normal file
View File

@ -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.

View 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 /// before concluding that someone is trying to DoS us
/// ///
/// C_RUST_COUPLED: protover.c `MAX_PROTOCOLS_TO_EXPAND` /// 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. /// The maximum size an `UnknownProtocol`'s name may be.
pub(crate) const MAX_PROTOCOL_NAME_LENGTH: usize = 100; pub(crate) const MAX_PROTOCOL_NAME_LENGTH: usize = 100;