Skip to content

Commit

Permalink
Merge pull request #1153 from cammeresi/master
Browse files Browse the repository at this point in the history
impl Debug for Statement
  • Loading branch information
sfackler authored Jul 6, 2024
2 parents 98f5a11 + 2b1949d commit 0bd8b2b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tokio-postgres/src/statement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ impl Statement {
}
}

impl std::fmt::Debug for Statement {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> Result<(), std::fmt::Error> {
f.debug_struct("Statement")
.field("name", &self.0.name)
.field("params", &self.0.params)
.field("columns", &self.0.columns)
.finish_non_exhaustive()
}
}

/// Information about a column of a query.
#[derive(Debug)]
pub struct Column {
Expand Down

0 comments on commit 0bd8b2b

Please sign in to comment.