From b468eaaffaa0ae641a8cd4c73073b4d20c373d80 Mon Sep 17 00:00:00 2001 From: Evan Mesterhazy Date: Sat, 4 May 2024 10:09:31 -0400 Subject: [PATCH] Fix clippy dead_code error for `IsizeExt` with latest 1.78 stable toolchain On 1.78 clippy notices that the `clamp_into_u16` `IsizeExt` trait is dead code. The corresponding function in the `UsizeExt` trait is used however. This commit tags the `IsizeExt` version with `#[allow(dead_code)]` to silence the clippy error. --- src/util.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.rs b/src/util.rs index 0bac35f..b825660 100644 --- a/src/util.rs +++ b/src/util.rs @@ -19,6 +19,7 @@ impl UsizeExt for usize { pub trait IsizeExt { fn unwrap_usize(self) -> usize; + #[allow(dead_code)] fn clamp_into_u16(self) -> u16; fn clamp_into_usize(self) -> usize; }