about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Emerson <github@mail.nosreme.org>2017-10-19 23:32:27 +0100
committerChris Emerson <github@mail.nosreme.org>2017-10-19 23:32:27 +0100
commit2a84352d1df09d04fc38311f49bb4ccb4ad83a91 (patch)
tree3078882ef04e4804ddc5a09fa8d513c7b3164566
parentf9bcb58eb3f3b6508cd7a24e7728f21fcd8f63b9 (diff)
Run rustfmt on the new changes.
-rw-r--r--src/rustfmt_diff.rs80
1 files changed, 50 insertions, 30 deletions
diff --git a/src/rustfmt_diff.rs b/src/rustfmt_diff.rs
index d6b021d42d4..c0aca68fe2f 100644
--- a/src/rustfmt_diff.rs
+++ b/src/rustfmt_diff.rs
@@ -165,52 +165,72 @@ where
 
 #[cfg(test)]
 mod test {
-    use super::{make_diff,Mismatch};
+    use super::{make_diff, Mismatch};
     use super::DiffLine::*;
 
     #[test]
     fn diff_simple() {
         let src = "one\ntwo\nthree\nfour\nfive\n";
-        let dest= "one\ntwo\ntrois\nfour\nfive\n";
+        let dest = "one\ntwo\ntrois\nfour\nfive\n";
         let diff = make_diff(src, dest, 1);
-        assert_eq!(diff, vec![Mismatch { line_number: 2,
-                                         lines: vec![
-                                             Context("two".into()),
-                                             Resulting("three".into()),
-                                             Expected("trois".into()),
-                                             Context("four".into()),
-                                         ] }]);
+        assert_eq!(
+            diff,
+            vec![
+                Mismatch {
+                    line_number: 2,
+                    lines: vec![
+                        Context("two".into()),
+                        Resulting("three".into()),
+                        Expected("trois".into()),
+                        Context("four".into()),
+                    ],
+                },
+            ]
+        );
     }
 
     #[test]
     fn diff_simple2() {
         let src = "one\ntwo\nthree\nfour\nfive\nsix\nseven\n";
-        let dest= "one\ntwo\ntrois\nfour\ncinq\nsix\nseven\n";
+        let dest = "one\ntwo\ntrois\nfour\ncinq\nsix\nseven\n";
         let diff = make_diff(src, dest, 1);
-        assert_eq!(diff, vec![Mismatch { line_number: 2,
-                                         lines: vec![
-                                             Context("two".into()),
-                                             Resulting("three".into()),
-                                             Expected("trois".into()),
-                                             Context("four".into()),
-                                         ] },
-                              Mismatch { line_number: 5,
-                                         lines: vec![
-                                             Resulting("five".into()),
-                                             Expected("cinq".into()),
-                                             Context("six".into()),
-                                         ] }]);
+        assert_eq!(
+            diff,
+            vec![
+                Mismatch {
+                    line_number: 2,
+                    lines: vec![
+                        Context("two".into()),
+                        Resulting("three".into()),
+                        Expected("trois".into()),
+                        Context("four".into()),
+                    ],
+                },
+                Mismatch {
+                    line_number: 5,
+                    lines: vec![
+                        Resulting("five".into()),
+                        Expected("cinq".into()),
+                        Context("six".into()),
+                    ],
+                },
+            ]
+        );
     }
 
     #[test]
     fn diff_zerocontext() {
         let src = "one\ntwo\nthree\nfour\nfive\n";
-        let dest= "one\ntwo\ntrois\nfour\nfive\n";
+        let dest = "one\ntwo\ntrois\nfour\nfive\n";
         let diff = make_diff(src, dest, 0);
-        assert_eq!(diff, vec![Mismatch { line_number: 3,
-                                         lines: vec![
-                                             Resulting("three".into()),
-                                             Expected("trois".into()),
-                                         ] }]);
+        assert_eq!(
+            diff,
+            vec![
+                Mismatch {
+                    line_number: 3,
+                    lines: vec![Resulting("three".into()), Expected("trois".into())],
+                },
+            ]
+        );
     }
-}
\ No newline at end of file
+}