From 70b04fd04d523663da7b1033df77956649cd7e3c Mon Sep 17 00:00:00 2001 From: Giles Cope Date: Tue, 18 May 2021 19:00:33 +0100 Subject: [PATCH] removed likely --- library/core/src/num/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/library/core/src/num/mod.rs b/library/core/src/num/mod.rs index 9cd278e752c..c263f4de0f1 100644 --- a/library/core/src/num/mod.rs +++ b/library/core/src/num/mod.rs @@ -1068,9 +1068,7 @@ fn from_str_radix(src: &str, radix: u32) -> Result() * 2 - is_signed_ty as usize, - ) { + if radix <= 16 && digits.len() <= mem::size_of::() * 2 - is_signed_ty as usize { // SAFETY: We can take this fast path when `radix.pow(digits.len()) - 1 <= T::MAX` // but the condition above is a faster (conservative) approximation of this. //