Skip to content

Conversation

@daxpedda
Copy link
Contributor

@daxpedda daxpedda commented Jan 6, 2022

This implements ZeroizeOnDrop for the following containers if all elements in that container also implement ZeroizeOnDrop:

  • [Z; N]
  • Option<Z>
  • Vec<Z>
  • Box<[Z]>
  • (A, ) up to ten elements

Additionally implemented for the following zero-sized types:

  • PhantomData<Z>
  • PhantomPinned
  • ()

This required to remove the Drop constraint from ZeroizeOnDrop.

@tarcieri tarcieri merged commit 3d9cd39 into RustCrypto:master Jan 6, 2022
@tarcieri
Copy link
Member

tarcieri commented Jan 6, 2022

Nice! Thank you

@tarcieri tarcieri mentioned this pull request Jan 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants