Use .contains instead of manual reimplementation.

It's also significantly easier to read.
This commit is contained in:
frogtd 2021-08-03 04:30:44 -04:00 committed by GitHub
parent e91405b9d5
commit 499758a285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
);