Skip to content

Commit af8c99a

Browse files
authored
Rollup merge of #87723 - frogtd:patch-3, r=JohnTitor
Use .contains instead of manual reimplementation. It's also significantly easier to read.
2 parents 917c047 + 499758a commit af8c99a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/num/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par
847847
use self::ParseIntError as PIE;
848848

849849
assert!(
850-
radix >= 2 && radix <= 36,
850+
(2..=36).contains(&radix),
851851
"from_str_radix_int: must lie in the range `[2, 36]` - found {}",
852852
radix
853853
);

0 commit comments

Comments
 (0)