4639: Fixed missing newline on each field on "Missing structure fields". r=flodiebold a=flipbit03



Co-authored-by: Cadu <cadu.coelho@gmail.com>
This commit is contained in:
bors[bot] 2020-05-27 19:14:11 +00:00 committed by GitHub
commit 6d569c32fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -40,7 +40,7 @@ impl Diagnostic for MissingFields {
fn message(&self) -> String { fn message(&self) -> String {
let mut buf = String::from("Missing structure fields:\n"); let mut buf = String::from("Missing structure fields:\n");
for field in &self.missed_fields { for field in &self.missed_fields {
format_to!(buf, "- {}", field); format_to!(buf, "- {}\n", field);
} }
buf buf
} }
@ -73,7 +73,7 @@ impl Diagnostic for MissingPatFields {
fn message(&self) -> String { fn message(&self) -> String {
let mut buf = String::from("Missing structure fields:\n"); let mut buf = String::from("Missing structure fields:\n");
for field in &self.missed_fields { for field in &self.missed_fields {
format_to!(buf, "- {}", field); format_to!(buf, "- {}\n", field);
} }
buf buf
} }

View file

@ -664,7 +664,7 @@ mod tests {
assert_debug_snapshot!(diagnostics, @r###" assert_debug_snapshot!(diagnostics, @r###"
[ [
Diagnostic { Diagnostic {
message: "Missing structure fields:\n- b", message: "Missing structure fields:\n- b\n",
range: 224..233, range: 224..233,
severity: Error, severity: Error,
fix: Some( fix: Some(