Merge pull request #1133 from detailyang/hotfix/ast-formatstring-display

hotfix:fix formatstring display trait
This commit is contained in:
Alessandro Coglio 2021-07-09 14:55:41 -07:00 committed by GitHub
commit 640c22c70c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ impl fmt::Display for FormatString {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(
f,
"{}",
"\"{}\", {}",
self.parts
.iter()
.map(|x| match x {
@ -82,7 +82,12 @@ impl fmt::Display for FormatString {
FormatStringPart::Container => "{}".to_string(),
})
.collect::<Vec<_>>()
.join("")
.join(""),
self.parameters
.iter()
.map(|p| p.to_string())
.collect::<Vec<_>>()
.join(",")
)
}
}