Skip to content

Commit 0c017ea

Browse files
committed
Remove semicolons in clippy_utils
1 parent 9cad27f commit 0c017ea

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

clippy_utils/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ fn parse_attrs<F: FnMut(u64)>(sess: &Session, attrs: &[ast::Attribute], name: &'
115115
for attr in get_attr(sess, attrs, name) {
116116
if let Some(ref value) = attr.value_str() {
117117
if let Ok(value) = FromStr::from_str(&value.as_str()) {
118-
f(value)
118+
f(value);
119119
} else {
120120
sess.span_err(attr.span, "not a number");
121121
}

clippy_utils/src/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ pub fn multispan_sugg<I>(diag: &mut DiagnosticBuilder<'_>, help_msg: &str, sugg:
223223
where
224224
I: IntoIterator<Item = (Span, String)>,
225225
{
226-
multispan_sugg_with_applicability(diag, help_msg, Applicability::Unspecified, sugg)
226+
multispan_sugg_with_applicability(diag, help_msg, Applicability::Unspecified, sugg);
227227
}
228228

229229
/// Create a suggestion made from several `span → replacement`.

clippy_utils/src/hir_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
810810
self.hash_name(f.ident.name);
811811
self.hash_pat(f.pat);
812812
}
813-
e.hash(&mut self.s)
813+
e.hash(&mut self.s);
814814
},
815815
PatKind::Tuple(pats, e) => {
816816
for pat in pats {

clippy_utils/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[&str]) -> Option<Vec
667667
return None;
668668
}
669669
matched.push(args); // build up `matched` backwards
670-
current = &args[0] // go to parent expression
670+
current = &args[0]; // go to parent expression
671671
} else {
672672
return None;
673673
}
@@ -1094,9 +1094,9 @@ pub fn is_refutable(cx: &LateContext<'_>, pat: &Pat<'_>) -> bool {
10941094
/// the function once on the given pattern.
10951095
pub fn recurse_or_patterns<'tcx, F: FnMut(&'tcx Pat<'tcx>)>(pat: &'tcx Pat<'tcx>, mut f: F) {
10961096
if let PatKind::Or(pats) = pat.kind {
1097-
pats.iter().copied().for_each(f)
1097+
pats.iter().copied().for_each(f);
10981098
} else {
1099-
f(pat)
1099+
f(pat);
11001100
}
11011101
}
11021102

clippy_utils/src/sugg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ impl<T: LintContext> DiagnosticBuilderExt<T> for rustc_errors::DiagnosticBuilder
684684

685685
if let Some(non_whitespace_offset) = non_whitespace_offset {
686686
remove_span = remove_span
687-
.with_hi(remove_span.hi() + BytePos(non_whitespace_offset.try_into().expect("offset too large")))
687+
.with_hi(remove_span.hi() + BytePos(non_whitespace_offset.try_into().expect("offset too large")));
688688
}
689689
}
690690

clippy_utils/src/usage.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl<'tcx> MutVarsDelegate {
5959
//FIXME: This causes false negatives. We can't get the `NodeId` from
6060
//`Categorization::Upvar(_)`. So we search for any `Upvar`s in the
6161
//`while`-body, not just the ones in the condition.
62-
self.skip = true
62+
self.skip = true;
6363
},
6464
_ => {},
6565
}
@@ -71,12 +71,12 @@ impl<'tcx> Delegate<'tcx> for MutVarsDelegate {
7171

7272
fn borrow(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId, bk: ty::BorrowKind) {
7373
if let ty::BorrowKind::MutBorrow = bk {
74-
self.update(cmt)
74+
self.update(cmt);
7575
}
7676
}
7777

7878
fn mutate(&mut self, cmt: &PlaceWithHirId<'tcx>, _: HirId) {
79-
self.update(cmt)
79+
self.update(cmt);
8080
}
8181

8282
fn fake_read(&mut self, _: rustc_typeck::expr_use_visitor::Place<'tcx>, _: FakeReadCause, _: HirId) {}

clippy_utils/src/visitors.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ where
8787
}
8888

8989
fn visit_stmt(&mut self, stmt: &'hir hir::Stmt<'_>) {
90-
intravisit::walk_stmt(&mut *self.inside_stmt(true), stmt)
90+
intravisit::walk_stmt(&mut *self.inside_stmt(true), stmt);
9191
}
9292

9393
fn visit_expr(&mut self, expr: &'hir hir::Expr<'_>) {
@@ -219,7 +219,7 @@ pub fn visit_break_exprs<'tcx>(
219219

220220
fn visit_expr(&mut self, e: &'tcx Expr<'_>) {
221221
if let ExprKind::Break(dest, sub_expr) = e.kind {
222-
self.0(e, dest, sub_expr)
222+
self.0(e, dest, sub_expr);
223223
}
224224
walk_expr(self, e);
225225
}
@@ -251,7 +251,7 @@ pub fn is_res_used(cx: &LateContext<'_>, res: Res, body: BodyId) -> bool {
251251
self.found = true;
252252
}
253253
} else {
254-
walk_expr(self, e)
254+
walk_expr(self, e);
255255
}
256256
}
257257
}

0 commit comments

Comments
 (0)