From adb6b8d863c9288f0a87216e41ece936005e5c56 Mon Sep 17 00:00:00 2001 From: Umutcan Oflaz Date: Sat, 13 Jun 2026 20:52:43 +0300 Subject: [PATCH] zeroize: replace derived Debug with opaque impl for Zeroizing --- zeroize/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zeroize/src/lib.rs b/zeroize/src/lib.rs index 6f0a303e..d780af55 100644 --- a/zeroize/src/lib.rs +++ b/zeroize/src/lib.rs @@ -599,10 +599,16 @@ impl Zeroize for CString { /// /// `Zeroizing` 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); +impl core::fmt::Debug for Zeroizing { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + f.debug_struct("Zeroizing").finish_non_exhaustive() + } +} + impl Zeroizing where Z: Zeroize,