Skip to content

Commit b7ceb4d

Browse files
committed
rustfmt
1 parent 14a4e3b commit b7ceb4d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

clippy_lints/src/loops.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,8 @@ fn has_mutable_variables<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) ->
10811081
def_id.expect_local(),
10821082
cx.param_env,
10831083
cx.typeck_results(),
1084-
).walk_expr(expr);
1084+
)
1085+
.walk_expr(expr);
10851086
});
10861087

10871088
delegate.found_mutable
@@ -1271,7 +1272,7 @@ fn detect_same_item_push<'tcx>(
12711272
SAME_ITEM_PUSH,
12721273
vec.span,
12731274
"it looks like the same item is being pushed into this Vec",
1274-
None,
1275+
None,
12751276
&format!(
12761277
"try using vec![{};SIZE] or {}.resize(NEW_SIZE, {})",
12771278
item_str, vec_str, item_str

tests/ui/same_item_push.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fn main() {
8080
}
8181
let mut vec_a: Vec<A> = Vec::new();
8282
for i in 0..30 {
83-
vec_a.push(A{kind: i});
83+
vec_a.push(A { kind: i });
8484
}
8585
let mut vec12: Vec<u8> = Vec::new();
8686
for a in vec_a {

0 commit comments

Comments
 (0)