Skip to content

Commit

Permalink
using display comma sep func
Browse files Browse the repository at this point in the history
  • Loading branch information
seve-martinez committed Sep 22, 2024
1 parent add9bb9 commit 5ef61d4
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/ast/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2125,26 +2125,10 @@ impl Display for FromTable {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
FromTable::WithFromKeyword(tables) => {
write!(
f,
"FROM {}",
tables
.iter()
.map(|t| t.to_string())
.collect::<Vec<_>>()
.join(", ")
)
write!(f, "FROM {}", display_comma_separated(tables))
}
FromTable::WithoutKeyword(tables) => {
write!(
f,
"{}",
tables
.iter()
.map(|t| t.to_string())
.collect::<Vec<_>>()
.join(", ")
)
write!(f, "{}", display_comma_separated(tables))
}
}
}
Expand Down

0 comments on commit 5ef61d4

Please sign in to comment.