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

Function zeroize_on_drop_check_tuple

zeroize/tests/zeroize.rs:99–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97
98#[test]
99fn zeroize_on_drop_check_tuple() {
100 let mut tup1 = (ZeroizedOnDrop(42),);
101 unsafe { ptr::drop_in_place(&raw mut tup1) };
102 assert_eq!(tup1, (ZeroizedOnDrop(0),));
103
104 let mut tup2 = (ZeroizedOnDrop(42), ZeroizedOnDrop(42));
105 unsafe { ptr::drop_in_place(&raw mut tup2) };
106 assert_eq!(tup2, (ZeroizedOnDrop(0), ZeroizedOnDrop(0)));
107}
108
109#[cfg(feature = "alloc")]
110#[test]

Callers

nothing calls this directly

Calls 1

ZeroizedOnDropClass · 0.85

Tested by

no test coverage detected