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

Function zeroize_without_drop

zeroize_derive/src/lib.rs:445–471  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

443
444 #[test]
445 fn zeroize_without_drop() {
446 test_derive(
447 derive_zeroize_impl,
448 quote! {
449 struct Z {
450 a: String,
451 b: Vec<u8>,
452 c: [u8; 3],
453 }
454 },
455 quote! {
456 impl ::zeroize::Zeroize for Z {
457 fn zeroize(&mut self) {
458 match self {
459 #[allow(unused_variables, unused_assignments)]
460 Z { a, b, c } => {
461 a.zeroize();
462 b.zeroize();
463 c.zeroize()
464 }
465 _ => {}
466 }
467 }
468 }
469 },
470 );
471 }
472
473 #[test]
474 fn zeroize_with_drop() {

Callers

nothing calls this directly

Calls 1

test_deriveFunction · 0.85

Tested by

no test coverage detected