1
Fork 0

removed likely

This commit is contained in:
Giles Cope 2021-05-18 19:00:33 +01:00 committed by gilescope
parent b9923a80c2
commit 70b04fd04d
No known key found for this signature in database
GPG key ID: 631F6352D4A949EF

View file

@ -1068,9 +1068,7 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32) -> Result<T, Par
let mut result = T::from_u32(0);
if intrinsics::likely(
radix <= 16 && digits.len() <= mem::size_of::<T>() * 2 - is_signed_ty as usize,
) {
if radix <= 16 && digits.len() <= mem::size_of::<T>() * 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.
//