aboutsummaryrefslogtreecommitdiff
path: root/src/rust
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2018-08-18 20:07:16 +0000
committercypherpunks <cypherpunks@torproject.org>2018-09-24 14:30:43 +0000
commitb91bc1babc521abe1497fd913e4fe3fb5a909612 (patch)
tree39dd4d6d782ebaf899518a3d03ce898bc5e2589c /src/rust
parent1ed5e009cb09b1e0b348f6c8420a0d4dae746ec9 (diff)
downloadtor-b91bc1babc521abe1497fd913e4fe3fb5a909612.tar.gz
tor-b91bc1babc521abe1497fd913e4fe3fb5a909612.zip
rust/protover: remove redundant ExceedsMax checks
This is already checked elsewhere.
Diffstat (limited to 'src/rust')
-rw-r--r--src/rust/protover/protoset.rs6
1 files changed, 0 insertions, 6 deletions
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));
}
}