Skip to content

Commit

Permalink
Rollup merge of rust-lang#87723 - frogtd:patch-3, r=JohnTitor
Browse files Browse the repository at this point in the history
Use .contains instead of manual reimplementation.

It's also significantly easier to read.
  • Loading branch information
JohnTitor committed Aug 3, 2021
2 parents f32ede0 + 499758a commit 4921e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down

0 comments on commit 4921e73

Please sign in to comment.