Use .contains instead of manual reimplementation.
It's also significantly easier to read.
This commit is contained in:
parent
e91405b9d5
commit
499758a285
1 changed files with 1 additions and 1 deletions
|
@ -847,7 +847,7 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par
|
|||
use self::ParseIntError as PIE;
|
||||
|
||||
assert!(
|
||||
radix >= 2 && radix <= 36,
|
||||
(2..=36).contains(&radix),
|
||||
"from_str_radix_int: must lie in the range `[2, 36]` - found {}",
|
||||
radix
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue