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

Function zeroize_on_drop_check_tuple

zeroize/tests/zeroize.rs:111–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109
110#[test]
111fn zeroize_on_drop_check_tuple() {
112 let mut tup1 = (ZeroizedOnDrop(42),);
113 unsafe { ptr::drop_in_place(&raw mut tup1) };
114 assert_eq!(tup1, (ZeroizedOnDrop(0),));
115
116 let mut tup2 = (ZeroizedOnDrop(42), ZeroizedOnDrop(42));
117 unsafe { ptr::drop_in_place(&raw mut tup2) };
118 assert_eq!(tup2, (ZeroizedOnDrop(0), ZeroizedOnDrop(0)));
119}
120
121#[cfg(feature = "alloc")]
122#[test]

Callers

nothing calls this directly

Calls 1

ZeroizedOnDropClass · 0.85

Tested by

no test coverage detected