()
| 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() { |
nothing calls this directly
no test coverage detected