Skip to content

Commit 873ad47

Browse files
committed
Allow dead_code on AlignedType
We use the `AlignedType` and take a pointer to its inner data, never access the data directly - this confuses clippy causing a "field is never used" warning. Shoosh the lint and add a code comment explaining why.
1 parent fb676dc commit 873ad47

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

secp256k1-sys/src/types.rs

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ pub use core::ffi::c_void;
1919
// 16 matches is as big as the biggest alignment in any arch that rust currently supports https://github.com/rust-lang/rust/blob/2c31b45ae878b821975c4ebd94cc1e49f6073fd0/library/std/src/sys_common/alloc.rs
2020
#[repr(align(16))]
2121
#[derive(Default, Copy, Clone)]
22+
#[allow(dead_code)] // We never access the inner data directly, only by way of a pointer.
2223
pub struct AlignedType([u8; 16]);
2324

2425
impl AlignedType {

0 commit comments

Comments
 (0)