tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit b91bc1babc521abe1497fd913e4fe3fb5a909612
parent 1ed5e009cb09b1e0b348f6c8420a0d4dae746ec9
Author: cypherpunks <cypherpunks@torproject.org>
Date:   Sat, 18 Aug 2018 20:07:16 +0000

rust/protover: remove redundant ExceedsMax checks

This is already checked elsewhere.

Diffstat:
Msrc/rust/protover/protoset.rs | 6------
1 file changed, 0 insertions(+), 6 deletions(-)

diff --git 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)); } }