From: cypherpunks Date: Sat, 18 Aug 2018 20:07:16 +0000 (+0000) Subject: rust/protover: remove redundant ExceedsMax checks X-Git-Tag: tor-0.3.5.4-alpha~43^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b91bc1babc521abe1497fd913e4fe3fb5a909612;p=thirdparty%2Ftor.git rust/protover: remove redundant ExceedsMax checks This is already checked elsewhere. --- diff --git a/src/rust/protover/protoset.rs b/src/rust/protover/protoset.rs index 7576324c92..4f603a33ce 100644 --- a/src/rust/protover/protoset.rs +++ b/src/rust/protover/protoset.rs @@ -356,16 +356,10 @@ impl FromStr for ProtoSet { let lo: Version = low.parse().or(Err(ProtoverError::Unparseable))?; let hi: Version = high.parse().or(Err(ProtoverError::Unparseable))?; - if lo == u32::MAX || hi == u32::MAX { - return Err(ProtoverError::ExceedsMax); - } pairs.push((lo, hi)); } else { let v: u32 = p.parse().or(Err(ProtoverError::Unparseable))?; - if v == u32::MAX { - return Err(ProtoverError::ExceedsMax); - } pairs.push((v, v)); } }