]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
rust/protover: remove redundant ExceedsMax checks
authorcypherpunks <cypherpunks@torproject.org>
Sat, 18 Aug 2018 20:07:16 +0000 (20:07 +0000)
committercypherpunks <cypherpunks@torproject.org>
Mon, 24 Sep 2018 14:30:43 +0000 (14:30 +0000)
This is already checked elsewhere.

src/rust/protover/protoset.rs

index 7576324c92c8dbdb510add0c0707464ab0455455..4f603a33cedc032a83a6c77ad0d681e257d9f7b2 100644 (file)
@@ -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));
             }
         }