diff options
Diffstat (limited to 'src/rustfmt_diff.rs')
| -rw-r--r-- | src/rustfmt_diff.rs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/src/rustfmt_diff.rs b/src/rustfmt_diff.rs index 4d05f544290..23cb3f21bf2 100644 --- a/src/rustfmt_diff.rs +++ b/src/rustfmt_diff.rs @@ -42,14 +42,10 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma } while let Some(line) = context_queue.pop_front() { - mismatch - .lines - .push(DiffLine::Context(line.to_owned())); + mismatch.lines.push(DiffLine::Context(line.to_owned())); } - mismatch - .lines - .push(DiffLine::Resulting(str.to_owned())); + mismatch.lines.push(DiffLine::Resulting(str.to_owned())); lines_since_mismatch = 0; } diff::Result::Right(str) => { @@ -59,14 +55,10 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma } while let Some(line) = context_queue.pop_front() { - mismatch - .lines - .push(DiffLine::Context(line.to_owned())); + mismatch.lines.push(DiffLine::Context(line.to_owned())); } - mismatch - .lines - .push(DiffLine::Expected(str.to_owned())); + mismatch.lines.push(DiffLine::Expected(str.to_owned())); line_number += 1; lines_since_mismatch = 0; } @@ -76,9 +68,7 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma } if lines_since_mismatch < context_size { - mismatch - .lines - .push(DiffLine::Context(str.to_owned())); + mismatch.lines.push(DiffLine::Context(str.to_owned())); } else { context_queue.push_back(str); } |
