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

Function zeroize_with_skip

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

Source from the content-addressed store, hash-verified

508
509 #[test]
510 fn zeroize_with_skip() {
511 test_derive(
512 derive_zeroize_impl,
513 quote! {
514 struct Z {
515 a: String,
516 b: Vec<u8>,
517 #[zeroize(skip)]
518 c: [u8; 3],
519 }
520 },
521 quote! {
522 impl ::zeroize::Zeroize for Z {
523 fn zeroize(&mut self) {
524 match self {
525 #[allow(unused_variables, unused_assignments)]
526 Z { a, b, c } => {
527 a.zeroize();
528 b.zeroize()
529 }
530 _ => {}
531 }
532 }
533 }
534 },
535 );
536 }
537
538 #[test]
539 fn zeroize_with_bound() {

Callers

nothing calls this directly

Calls 1

test_deriveFunction · 0.85

Tested by

no test coverage detected