Skip to content

Commit

Permalink
fix impl Display regression
Browse files Browse the repository at this point in the history
messed up merging #154 a tad too early, CI UI was acting up
  • Loading branch information
serprex committed Sep 24, 2024
1 parent e5c55b0 commit 1f136af
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/sql/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::fmt::{self, Display};
use std::fmt::{self, Display, Write};

use crate::{
error::{Error, Result},
Expand Down Expand Up @@ -32,13 +32,14 @@ impl fmt::Display for SqlBuilder {
SqlBuilder::InProgress(parts) => {
for part in parts {
match part {
Part::Arg => write!(f, "?")?,
Part::Fields => write!(f, "?fields")?,
Part::Text(text) => write!(f, "{text}")?,
Part::Arg => f.write_char('?')?,
Part::Fields => f.write_str("?fields")?,
Part::Str(text) => f.write_str(text)?,
Part::Text(text) => f.write_str(text)?,
}
}
}
SqlBuilder::Failed(err) => write!(f, "{err}")?,
SqlBuilder::Failed(err) => f.write_str(err)?,
}
Ok(())
}
Expand Down

0 comments on commit 1f136af

Please sign in to comment.