Skip to content

Commit

Permalink
Remove ZeroizeOnDrop implementation for #[zeroize(drop)] (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
daxpedda authored Jan 14, 2022
1 parent 5092abf commit ca16325
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions zeroize/derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,17 +317,13 @@ fn derive_zeroize_with_drop(s: synstructure::Structure<'_>) -> TokenStream {
}
});

let zeroize_on_drop_impl = impl_zeroize_on_drop(&s);

let zeroize_impl = derive_zeroize_without_drop(s);

quote! {
#zeroize_impl

#[doc(hidden)]
#drop_impl

#zeroize_on_drop_impl
}
}

Expand Down Expand Up @@ -418,12 +414,6 @@ mod tests {
}
}
};
#[allow(non_upper_case_globals)]
#[doc(hidden)]
const _DERIVE_zeroize_ZeroizeOnDrop_FOR_Z: () = {
extern crate zeroize;
impl zeroize::ZeroizeOnDrop for Z {}
};
}
no_build // tests the code compiles are in the `zeroize` crate
}
Expand Down

0 comments on commit ca16325

Please sign in to comment.