fix(deps): update rust crate secrecy to 0.10

This commit is contained in:
Renovate Bot 2024-10-29 22:46:37 +00:00 committed by Paul Campbell
parent 5056957df7
commit f2b4489bc5
2 changed files with 2 additions and 2 deletions

View file

@ -26,7 +26,7 @@ tracing = "0.1"
async-trait = "0.1" async-trait = "0.1"
http = "1.1" http = "1.1"
reqwest = "0.12" reqwest = "0.12"
secrecy = "0.8" secrecy = "0.10"
serde = { version = "1.0", features = ["derive"] } serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0" serde_json = "1.0"
serde-xml-rs = "0.6" serde-xml-rs = "0.6"

View file

@ -4,7 +4,7 @@ use std::fmt::{Display, Formatter};
pub struct Password(secrecy::SecretString); pub struct Password(secrecy::SecretString);
impl Password { impl Password {
pub fn new(password: String) -> Self { pub fn new(password: String) -> Self {
Self(secrecy::SecretString::new(password)) Self(secrecy::SecretString::from(password))
} }
pub fn expose_password(&self) -> &str { pub fn expose_password(&self) -> &str {
secrecy::ExposeSecret::expose_secret(&self.0) secrecy::ExposeSecret::expose_secret(&self.0)