]> git.lizzy.rs Git - rust.git/commitdiff
Update tests
authortopecongiro <seuchida@gmail.com>
Mon, 13 Nov 2017 07:42:04 +0000 (16:42 +0900)
committertopecongiro <seuchida@gmail.com>
Mon, 13 Nov 2017 08:33:32 +0000 (17:33 +0900)
tests/target/chains-visual.rs
tests/target/configs-generics_indent-visual.rs
tests/target/configs-where_pred_indent-visual.rs
tests/target/struct_tuple_visual.rs

index abba2853a6b7cd660aabac620d43d4a1bea2d8b2..a581703b7e534cfdd7252a18c1838c91cdfe8bff 100644 (file)
@@ -17,17 +17,15 @@ fn main() {
     // Test case where first chain element isn't a path, but is shorter than
     // the size of a tab.
     x().y(|| match cond() {
-        true => (),
-        false => (),
-    });
+              true => (),
+              false => (),
+          });
 
-    loong_func().quux(move || {
-        if true {
-            1
-        } else {
-            2
-        }
-    });
+    loong_func().quux(move || if true {
+                          1
+                      } else {
+                          2
+                      });
 
     some_fuuuuuuuuunction().method_call_a(aaaaa, bbbbb, |c| {
         let x = c;
@@ -49,10 +47,10 @@ fn main() {
         });
     });
 
-    let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum =
-        xxxxxxx.map(|x| x + 5)
-               .map(|x| x / 2)
-               .fold(0, |acc, x| acc + x);
+    let suuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuum = xxxxxxx.map(|x| x + 5)
+                                                                          .map(|x| x / 2)
+                                                                          .fold(0,
+                                                                                |acc, x| acc + x);
 
     aaaaaaaaaaaaaaaa.map(|x| {
         x += 1;
@@ -62,15 +60,11 @@ fn main() {
 }
 
 fn floaters() {
-    let z = Foo {
-        field1: val1,
-        field2: val2,
-    };
-
-    let x = Foo {
-                field1: val1,
-                field2: val2,
-            }.method_call()
+    let z = Foo { field1: val1,
+                  field2: val2, };
+
+    let x = Foo { field1: val1,
+                  field2: val2, }.method_call()
             .method_call();
 
     let y = if cond {
@@ -83,12 +77,10 @@ fn floaters() {
         match x {
             PushParam => {
                 // params are 1-indexed
-                stack.push(
-                    mparams[match cur.to_digit(10) {
-                                Some(d) => d as usize - 1,
-                                None => return Err("bad param number".to_owned()),
-                            }].clone(),
-                );
+                stack.push(mparams[match cur.to_digit(10) {
+                                       Some(d) => d as usize - 1,
+                                       None => return Err("bad param number".to_owned()),
+                                   }].clone());
             }
         }
     }
@@ -106,10 +98,8 @@ fn floaters() {
     })
                   .quux();
 
-    Foo {
-        y: i_am_multi_line,
-        z: ok,
-    }.baz(|| {
+    Foo { y: i_am_multi_line,
+          z: ok, }.baz(|| {
         force();
         multiline();
     })
@@ -157,10 +147,8 @@ fn issue1434() {
     for _ in 0..100 {
         let prototype_id =
             PrototypeIdData::from_reader::<_, B>(&mut self.file_cursor).chain_err(|| {
-                format!(
-                    "could not read prototype ID at offset {:#010x}",
-                    current_offset
-                )
+                format!("could not read prototype ID at offset {:#010x}",
+                        current_offset)
             })?;
     }
 }
index 5ea1c9143893c5d23937222800fbe0eb4fbf31b9..491075a146d1b378e2b24331baca241a74d73d75 100644 (file)
@@ -14,7 +14,7 @@ fn lorem<Ipsum: Eq = usize,
     amet: Amet,
     adipiscing: Adipiscing,
     consectetur: Consectetur,
-    elit: Elit,
-) -> T {
+    elit: Elit)
+    -> T {
     // body
 }
index b878d726dffdabe4ae8a0b2062cddfe0cf475e88..45799dcd5fcdd385656fba0db421fd0aba32d61a 100644 (file)
@@ -2,11 +2,10 @@
 // Where predicate indent
 
 fn lorem<Ipsum, Dolor, Sit, Amet>() -> T
-where
-    Ipsum: Eq,
-    Dolor: Eq,
-    Sit: Eq,
-    Amet: Eq,
+    where Ipsum: Eq,
+          Dolor: Eq,
+          Sit: Eq,
+          Amet: Eq
 {
     // body
 }
index af553942295545a413701f6a6e83f7dc1db4781d..369feae71d25079bedff046ab243240fa4f0e50a 100644 (file)
@@ -5,43 +5,33 @@
 fn foo() {
     Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(f(), b());
 
-    Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(
-        // Comment
-        foo(), // Comment
-        // Comment
-        bar(), // Comment
-    );
+    Foooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo(// Comment
+                                                                                      foo(), /* Comment */
+                                                                                      // Comment
+                                                                                      bar() /* Comment */);
 
     Foo(Bar, f());
 
-    Quux(
-        if cond {
-            bar();
-        },
-        baz(),
-    );
+    Quux(if cond {
+             bar();
+         },
+         baz());
 
-    Baz(
-        xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
-        zzzzz, // test
-    );
+    Baz(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
+        zzzzz /* test */);
 
-    A(
-        // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit
-        // amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante
-        // hendrerit. Donec et mollis dolor.
-        item(),
-        // Praesent et diam eget libero egestas mattis sit amet vitae augue.
-        // Nam tincidunt congue enim, ut porta lorem lacinia consectetur.
-        Item,
-    );
+    A(// Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit
+      // amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante
+      // hendrerit. Donec et mollis dolor.
+      item(),
+      // Praesent et diam eget libero egestas mattis sit amet vitae augue.
+      // Nam tincidunt congue enim, ut porta lorem lacinia consectetur.
+      Item);
 
-    Diagram(
-        //                 o        This graph demonstrates how
-        //                / \       significant whitespace is
-        //               o   o      preserved.
-        //              /|\   \
-        //             o o o   o
-        G,
-    )
+    Diagram(//                 o        This graph demonstrates how
+            //                / \       significant whitespace is
+            //               o   o      preserved.
+            //              /|\   \
+            //             o o o   o
+            G)
 }