Explorar o código

rust/protover: remove redundant ExceedsMax checks

This is already checked elsewhere.
cypherpunks %!s(int64=5) %!d(string=hai) anos
pai
achega
b91bc1babc
Modificáronse 1 ficheiros con 0 adicións e 6 borrados
  1. 0 6
      src/rust/protover/protoset.rs

+ 0 - 6
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));
             }
         }