Skip to content

Commit f8d0c4b

Browse files
committed
Squelch Clippy warnings for redundant cast
The cast is required on many, but not all, platforms.
1 parent 2b6ea50 commit f8d0c4b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ffi.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ pub extern "C" fn crc_fast_digest_update(
8787

8888
unsafe {
8989
let digest = &mut *(*handle).0;
90+
91+
#[allow(clippy::unnecessary_cast)]
9092
let bytes = slice::from_raw_parts(data as *const u8, len);
9193
digest.update(bytes);
9294
}
@@ -187,6 +189,7 @@ pub extern "C" fn crc_fast_checksum(
187189
return 0;
188190
}
189191
unsafe {
192+
#[allow(clippy::unnecessary_cast)]
190193
let bytes = slice::from_raw_parts(data as *const u8, len);
191194
crate::checksum(algorithm.into(), bytes)
192195
}

0 commit comments

Comments
 (0)