From 499758a285e57a9a2dd3d02a887d03772ebfc85e Mon Sep 17 00:00:00 2001 From: frogtd <31412003+frogtd@users.noreply.github.com> Date: Tue, 3 Aug 2021 04:30:44 -0400 Subject: [PATCH] Use .contains instead of manual reimplementation. It's also significantly easier to read. --- library/core/src/num/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 6c43d6d6212..9788404dd05 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -847,7 +847,7 @@ fn from_str_radix(src: &str, radix: u32) -> Result= 2 && radix <= 36, + (2..=36).contains(&radix), "from_str_radix_int: must lie in the range `[2, 36]` - found {}", radix );