Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion zeroize/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,16 @@ impl Zeroize for CString {
///
/// `Zeroizing<T>` is defined with `repr(transparent)`, which means it is
/// guaranteed to have the same physical representation as the underlying type.
#[derive(Debug, Default, Eq, PartialEq)]
#[derive(Default, Eq, PartialEq)]
#[repr(transparent)]
pub struct Zeroizing<Z: Zeroize + ?Sized>(Z);

impl<Z: Zeroize + ?Sized> core::fmt::Debug for Zeroizing<Z> {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
f.debug_struct("Zeroizing").finish_non_exhaustive()
}
}

impl<Z> Zeroizing<Z>
where
Z: Zeroize,
Expand Down
Loading