Skip to content

Commit

Permalink
secrecy: impl From<&str> for SecretString (#1237)
Browse files Browse the repository at this point in the history
  • Loading branch information
tony-iqlusion authored Oct 9, 2024
1 parent 08977b5 commit 3141f34
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 @@ -219,6 +219,12 @@ impl From<String> for SecretString {
}
}

impl From<&str> for SecretString {
fn from(s: &str) -> Self {
Self::from(String::from(s))
}
}

impl Clone for SecretString {
fn clone(&self) -> Self {
SecretBox {
Expand Down

0 comments on commit 3141f34

Please sign in to comment.