mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-05 03:24:06 +03:00
prevent bogus whitespace error messages due to \r
This commit is contained in:
+2
-1
@@ -127,7 +127,8 @@ fn fmt_lines(changes: &mut ChangeSet) {
|
||||
let mut cur_line = 1;
|
||||
let mut newline_count = 0;
|
||||
for (c, b) in text.chars() {
|
||||
if c == '\n' { // TOOD test for \r too
|
||||
if c == '\r' { continue; }
|
||||
if c == '\n' {
|
||||
// Check for (and record) trailing whitespace.
|
||||
if let Some(lw) = last_wspace {
|
||||
trims.push((cur_line, lw, b));
|
||||
|
||||
Reference in New Issue
Block a user