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

Function zeroize_on_drop_byte_arrays

zeroize/tests/zeroize.rs:64–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63#[test]
64fn zeroize_on_drop_byte_arrays() {
65 let mut arr = [ZeroizedOnDrop(42); 1];
66 unsafe { ptr::drop_in_place(&raw mut arr) };
67 assert_eq!(arr.as_ref(), [ZeroizedOnDrop(0); 1].as_ref());
68}
69
70#[test]
71fn zeroize_maybeuninit_byte_arrays() {

Callers

nothing calls this directly

Calls 1

ZeroizedOnDropClass · 0.85

Tested by

no test coverage detected