Skip to content

Commit 3a7f50f

Browse files
committed
Apply unnecessary_semicolon to Clippy sources
1 parent 51b0107 commit 3a7f50f

File tree

76 files changed

+88
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+88
-88
lines changed

clippy_dev/src/setup/intellij.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn check_and_get_rustc_dir(rustc_path: &str) -> Result<PathBuf, ()> {
6262
eprintln!("error: unable to get the absolute path of rustc ({err})");
6363
return Err(());
6464
},
65-
};
65+
}
6666
}
6767

6868
let path = path.join("compiler");

clippy_dev/src/update_lints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ fn try_rename_file(old_name: &Path, new_name: &Path) -> bool {
842842
Ok(file) => drop(file),
843843
Err(e) if matches!(e.kind(), io::ErrorKind::AlreadyExists | io::ErrorKind::NotFound) => return false,
844844
Err(e) => panic_file(e, new_name, "create"),
845-
};
845+
}
846846
match fs::rename(old_name, new_name) {
847847
Ok(()) => true,
848848
Err(e) => {

clippy_lints/src/assigning_clones.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ fn build_sugg<'tcx>(
257257
// The receiver may have been a value type, so we need to add an `&` to
258258
// be sure the argument to clone_from will be a reference.
259259
arg_sugg = arg_sugg.addr();
260-
};
260+
}
261261

262262
format!("{receiver_sugg}.clone_from({arg_sugg})")
263263
},

clippy_lints/src/attrs/mixed_attributes_style.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub(super) fn check(cx: &EarlyContext<'_>, item_span: Span, attrs: &[Attribute])
6060
}
6161
outer_attr_kind.insert(kind);
6262
},
63-
};
63+
}
6464
}
6565
}
6666

clippy_lints/src/casts/cast_possible_wrap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,6 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_from: Ty<'_>, ca
8484
diag
8585
.note("`usize` and `isize` may be as small as 16 bits on some platforms")
8686
.note("for more information see https://doc.rust-lang.org/reference/types/numeric.html#machine-dependent-integer-types");
87-
};
87+
}
8888
});
8989
}

clippy_lints/src/casts/cast_sign_loss.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ fn expr_muldiv_sign(cx: &LateContext<'_>, expr: &Expr<'_>) -> Sign {
205205
// - uncertain if there are any uncertain values (because they could be negative or positive),
206206
Sign::Uncertain => return Sign::Uncertain,
207207
Sign::ZeroOrPositive => (),
208-
};
208+
}
209209
}
210210

211211
// A mul/div is:
@@ -236,7 +236,7 @@ fn expr_add_sign(cx: &LateContext<'_>, expr: &Expr<'_>) -> Sign {
236236
// - uncertain if there are any uncertain values (because they could be negative or positive),
237237
Sign::Uncertain => return Sign::Uncertain,
238238
Sign::ZeroOrPositive => positive_count += 1,
239-
};
239+
}
240240
}
241241

242242
// A sum is:

clippy_lints/src/checked_conversions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ fn get_types_from_cast<'a>(
273273
},
274274
_ => {},
275275
}
276-
};
276+
}
277277
None
278278
}
279279

clippy_lints/src/default_constructed_unit_structs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ impl LateLintPass<'_> for DefaultConstructedUnitStructs {
8080
String::new(),
8181
Applicability::MachineApplicable,
8282
);
83-
};
83+
}
8484
}
8585
}

clippy_lints/src/dereference.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ impl<'tcx> LateLintPass<'tcx> for Dereferencing<'tcx> {
331331
deref_count += 1;
332332
},
333333
None => break None,
334-
};
334+
}
335335
};
336336

337337
let use_node = use_cx.use_node(cx);

clippy_lints/src/enum_clike.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl<'tcx> LateLintPass<'tcx> for UnportableVariant {
7070
var.span,
7171
"C-like enum variant discriminant is not portable to 32-bit targets",
7272
);
73-
};
73+
}
7474
}
7575
}
7676
}

0 commit comments

Comments
 (0)