Skip to content

Commit

Permalink
secrecy: impl Default for SecretString (#1232)
Browse files Browse the repository at this point in the history
Closes #1228
  • Loading branch information
tony-iqlusion authored Oct 1, 2024
1 parent 2835a08 commit cf616b4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions secrecy/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ impl Clone for SecretString {
}
}

impl Default for SecretString {
fn default() -> SecretString {
String::default().into()
}
}

/// Marker trait for secrets which are allowed to be cloned
pub trait CloneableSecret: Clone + Zeroize {}

Expand Down

0 comments on commit cf616b4

Please sign in to comment.