]> git.lizzy.rs Git - rust.git/commitdiff
run rustfmt
authorManish Goregaokar <manishsmail@gmail.com>
Tue, 10 Jan 2017 07:56:13 +0000 (23:56 -0800)
committerManish Goregaokar <manishsmail@gmail.com>
Tue, 10 Jan 2017 07:56:13 +0000 (23:56 -0800)
clippy_lints/src/loops.rs

index 27bfa16d496a4b8f715d7fd5573511d221da2e2b..ee80844ae4bd73c1e40990bb32799a171980650e 100644 (file)
@@ -714,10 +714,12 @@ fn check_for_loop_over_map_kv<'a, 'tcx>(
         if pat.len() == 2 {
             let arg_span = arg.span;
             let (new_pat_span, kind, ty, mutbl) = match cx.tcx.tables().expr_ty(arg).sty {
-                ty::TyRef(_, ref tam) => match (&pat[0].node, &pat[1].node) {
-                    (key, _) if pat_is_wild(cx, key, body) => (pat[1].span, "value", tam.ty, tam.mutbl),
-                    (_, value) if pat_is_wild(cx, value, body) => (pat[0].span, "key", tam.ty, MutImmutable),
-                    _ => return,
+                ty::TyRef(_, ref tam) => {
+                    match (&pat[0].node, &pat[1].node) {
+                        (key, _) if pat_is_wild(cx, key, body) => (pat[1].span, "value", tam.ty, tam.mutbl),
+                        (_, value) if pat_is_wild(cx, value, body) => (pat[0].span, "key", tam.ty, MutImmutable),
+                        _ => return,
+                    }
                 },
                 _ => return,
             };