Skip to content

Commit 288f424

Browse files
committed
Auto merge of #12753 - epage:error, r=weihanglo
fix(test): Add back in newlines to diffs Errors like this aren't too helpful ``` error: stderr did not match: 1 1 error: failed to parse manifest at `[..]`2 2 3 3 Caused by:4 4 TOML parse error at line 3, column 275 5 |6 6 3 | version = 17 7 | ^8 - invalid type: integer `1`, expected SemVer version 8 + invalid type: integer `1`, expected a string or workspace ``` This was broken in #12581
2 parents 59596f0 + 37c6f3d commit 288f424

File tree

1 file changed

+1
-1
lines changed
  • crates/cargo-test-support/src

1 file changed

+1
-1
lines changed

crates/cargo-test-support/src/diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ pub fn render_colored_changes<T: fmt::Display>(changes: &[Change<T>]) -> String
132132
Change::Remove(i, s) => (format!("{:<4} ", i), '-', red, s),
133133
Change::Keep(x, y, s) => (format!("{:<4}{:<4} ", x, y), ' ', dim, s),
134134
};
135-
write!(
135+
writeln!(
136136
buffer,
137137
"{dim}{nums}{reset}{bold}{sign}{reset}{color}{text}{reset}"
138138
)

0 commit comments

Comments
 (0)