diff --git a/src/path/dec_int.rs b/src/path/dec_int.rs index 2730f829d..e04eecaf5 100644 --- a/src/path/dec_int.rs +++ b/src/path/dec_int.rs @@ -51,31 +51,6 @@ impl DecInt { let mut str_buf = Buffer::new(); let str_buf = str_buf.format(i); { - let max_buf_size = { - let bits = match TypeId::of::() { - id if [TypeId::of::(), TypeId::of::()].contains(&id) => u8::BITS, - id if [TypeId::of::(), TypeId::of::()].contains(&id) => u16::BITS, - id if [TypeId::of::(), TypeId::of::()].contains(&id) => u32::BITS, - id if [TypeId::of::(), TypeId::of::()].contains(&id) => u64::BITS, - id if [TypeId::of::(), TypeId::of::()].contains(&id) => u128::BITS, - id if [TypeId::of::(), TypeId::of::()].contains(&id) => { - usize::BITS - } - _ => unreachable!(), - }; - match bits { - 8 => "-128".len(), - 16 => "-32768".len(), - 32 => "-2147483648".len(), - 64 => "-9223372036854775808".len(), - 128 => "-170141183460469231731687303715884105728".len(), - _ => unreachable!(), - } - }; - // This optimizes out the assertion and bounds checks. - if str_buf.len() > max_buf_size { - unsafe { core::hint::unreachable_unchecked() } - } assert!( str_buf.len() < buf.len(), "{str_buf}{} unsupported.",