INNER CODE UNIT · Rust
fmt
apache/datafusion-sqlparser-rs · src/ast/mod.rs:181
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut delim = "";
for t in self.slice {
f.write_str(delim)?;
delim = self.sep;
t.fmt(f)?;
}
Ok(())
}
}
pub(crate) fn display_separated<'a, T>(slice: &'a [T], sep: &'static str) -> DisplaySeparated<'a, T>
where
T: fmt::Display,
{
DisplaySeparated { slice, sep }
}