Skip to content

Commit 0bd8b2b

Browse files
authored
Merge pull request #1153 from cammeresi/master
impl Debug for Statement
2 parents 98f5a11 + 2b1949d commit 0bd8b2b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tokio-postgres/src/statement.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,16 @@ impl Statement {
6161
}
6262
}
6363

64+
impl std::fmt::Debug for Statement {
65+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
66+
f.debug_struct("Statement")
67+
.field("name", &self.0.name)
68+
.field("params", &self.0.params)
69+
.field("columns", &self.0.columns)
70+
.finish_non_exhaustive()
71+
}
72+
}
73+
6474
/// Information about a column of a query.
6575
#[derive(Debug)]
6676
pub struct Column {

0 commit comments

Comments
 (0)