Print the inner string in Address debug output

This commit is contained in:
2026-11-30 07:37:02 +08:00
parent 9f3848199d
commit c270adbab4
2 changed files with 10 additions and 6 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ pub enum Tls {
Disabled,
}
/// A database address may contain credentials.
/// A database address. Debug output includes the full value, which may contain credentials.
#[derive(Clone, Deserialize)]
#[serde(transparent)]
pub struct Address(String);
@@ -40,7 +40,7 @@ impl From<String> for Address {
impl fmt::Debug for Address {
fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
formatter.write_str("Address([redacted])")
fmt::Debug::fmt(&self.0, formatter)
}
}