Skip to content

Commit

Permalink
Fix clippy dead_code error for IsizeExt with latest 1.78 stable too…
Browse files Browse the repository at this point in the history
…lchain

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.
  • Loading branch information
emesterhazy committed May 4, 2024
1 parent 4b57c3d commit b468eaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit b468eaa

Please sign in to comment.