From 5929bdd470e0c1d29664d76d51fe982a79aa7288 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Fri, 21 Mar 2025 13:33:57 +0700 Subject: [PATCH] Fix `clippy::legacy_numeric_constants` lints --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index eca88d8..d036905 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -939,7 +939,7 @@ impl SmallVec { // // In our case, this also ensures that a smallvec of zero-size items never spills, // and we never try to allocate zero bytes which `std::alloc::alloc` disallows. - core::usize::MAX + usize::MAX } } @@ -1397,7 +1397,7 @@ impl SmallVec { } let (lower_size_bound, _) = iter.size_hint(); - assert!(lower_size_bound <= core::isize::MAX as usize); // Ensure offset is indexable + assert!(lower_size_bound <= isize::MAX as usize); // Ensure offset is indexable assert!(index + lower_size_bound >= index); // Protect against overflow let mut num_added = 0;