Skip to content

Commit 9cf552e

Browse files
committed
Add a static immutable zero aligned type
1 parent a1705e3 commit 9cf552e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

secp256k1-sys/src/types.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ impl AlignedType {
4242
}
4343
}
4444

45+
/// A static zeroed out AlignedType for use in static assignments of [AlignedType; _]
46+
pub static ZERO_ALIGNED: AlignedType = AlignedType([0u8; 16]);
47+
4548
#[cfg(all(feature = "std", not(rust_secp_no_symbol_renaming)))]
4649
pub(crate) const ALIGN_TO: usize = mem::align_of::<AlignedType>();
4750

0 commit comments

Comments
 (0)