Skip to content

Commit

Permalink
debug trait for secret
Browse files Browse the repository at this point in the history
  • Loading branch information
aspect committed Sep 9, 2023
1 parent 572081f commit 2caf4df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions wallet/core/src/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,11 @@ impl Drop for Secret {
self.zeroize()
}
}

impl std::fmt::Debug for Secret {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Secret")
.field("secret", &"********")
.finish()
}
}

0 comments on commit 2caf4df

Please sign in to comment.