Skip to content

Commit 48e9a62

Browse files
committed
fix: move Display impl before test module to fix clippy error
1 parent e2f4d7a commit 48e9a62

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

packages/cipherstash-proxy/src/config/database.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,19 @@ impl DatabaseConfig {
110110
}
111111
}
112112

113+
///
114+
/// Password is NEVER EVER displayed
115+
///
116+
impl Display for DatabaseConfig {
117+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
118+
write!(
119+
f,
120+
"{}@{}:{}/{}",
121+
self.username, self.host, self.port, self.name,
122+
)
123+
}
124+
}
125+
113126
#[cfg(test)]
114127
mod tests {
115128
use super::*;
@@ -137,16 +150,3 @@ mod tests {
137150
);
138151
}
139152
}
140-
141-
///
142-
/// Password is NEVER EVER displayed
143-
///
144-
impl Display for DatabaseConfig {
145-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
146-
write!(
147-
f,
148-
"{}@{}:{}/{}",
149-
self.username, self.host, self.port, self.name,
150-
)
151-
}
152-
}

0 commit comments

Comments
 (0)