rust/protover: remove redundant ExceedsMax checks

This is already checked elsewhere.
This commit is contained in:
cypherpunks
2018-08-18 20:07:16 +00:00
parent 1ed5e009cb
commit b91bc1babc
-6
View 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));
}
}