MCPcopy Create free account
hub / github.com/RustCrypto/utils / zeroize_on_drop_byte_arrays

Function zeroize_on_drop_byte_arrays

zeroize/tests/zeroize.rs:76–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74
75#[test]
76fn zeroize_on_drop_byte_arrays() {
77 let mut arr = [ZeroizedOnDrop(42); 1];
78 unsafe { ptr::drop_in_place(&raw mut arr) };
79 assert_eq!(arr.as_ref(), [ZeroizedOnDrop(0); 1].as_ref());
80}
81
82#[test]
83fn zeroize_maybeuninit_byte_arrays() {

Callers

nothing calls this directly

Calls 1

ZeroizedOnDropClass · 0.85

Tested by

no test coverage detected