diff --git a/secrecy/src/lib.rs b/secrecy/src/lib.rs index 2b81477e..ecbe2297 100644 --- a/secrecy/src/lib.rs +++ b/secrecy/src/lib.rs @@ -219,6 +219,12 @@ impl From 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 {