diff options
| author | Nick Cameron <ncameron@mozilla.com> | 2017-06-12 15:58:58 +1200 |
|---|---|---|
| committer | Nick Cameron <ncameron@mozilla.com> | 2017-06-13 14:41:49 +1200 |
| commit | 1f512948a03cd24c2f8a056be0a2f53675802fd2 (patch) | |
| tree | 683723a5fc810af95d0c9c97cdbd98e87fc64063 /src/rustfmt_diff.rs | |
| parent | 32e882789ba98cf6c02b1822beecacbcb8800269 (diff) | |
Reformat source code using new defaults
Diffstat (limited to 'src/rustfmt_diff.rs')
| -rw-r--r-- | src/rustfmt_diff.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/rustfmt_diff.rs b/src/rustfmt_diff.rs index 23cb3f21bf2..ff35a83cc63 100644 --- a/src/rustfmt_diff.rs +++ b/src/rustfmt_diff.rs @@ -86,7 +86,8 @@ pub fn make_diff(expected: &str, actual: &str, context_size: usize) -> Vec<Misma } pub fn print_diff<F>(diff: Vec<Mismatch>, get_section_title: F) - where F: Fn(u32) -> String +where + F: Fn(u32) -> String, { match term::stdout() { Some(ref t) if isatty() && t.supports_color() => { @@ -115,10 +116,12 @@ pub fn print_diff<F>(diff: Vec<Mismatch>, get_section_title: F) } } -fn print_diff_fancy<F>(diff: Vec<Mismatch>, - get_section_title: F, - mut t: Box<term::Terminal<Output = io::Stdout>>) - where F: Fn(u32) -> String +fn print_diff_fancy<F>( + diff: Vec<Mismatch>, + get_section_title: F, + mut t: Box<term::Terminal<Output = io::Stdout>>, +) where + F: Fn(u32) -> String, { for mismatch in diff { let title = get_section_title(mismatch.line_number); @@ -145,7 +148,8 @@ fn print_diff_fancy<F>(diff: Vec<Mismatch>, } pub fn print_diff_basic<F>(diff: Vec<Mismatch>, get_section_title: F) - where F: Fn(u32) -> String +where + F: Fn(u32) -> String, { for mismatch in diff { let title = get_section_title(mismatch.line_number); |
