Skip to content

Commit

Permalink
cargo fmt -p clippy_{lints,utils}
Browse files Browse the repository at this point in the history
  • Loading branch information
cormacrelf committed Dec 12, 2021
1 parent 642f93b commit fb5fd98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/tools/clippy/clippy_lints/src/pattern_type_mismatch.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use clippy_utils::diagnostics::span_lint_and_help;
use rustc_hir::{
intravisit, Body, Expr, ExprKind, FnDecl, HirId, Let, LocalSource, Mutability, Pat, PatKind, Stmt,
StmtKind,
intravisit, Body, Expr, ExprKind, FnDecl, HirId, Let, LocalSource, Mutability, Pat, PatKind, Stmt, StmtKind,
};
use rustc_lint::{LateContext, LateLintPass, LintContext};
use rustc_middle::lint::in_external_macro;
Expand Down Expand Up @@ -194,5 +193,3 @@ fn find_first_mismatch<'tcx>(cx: &LateContext<'tcx>, pat: &Pat<'_>) -> Option<(S
});
result
}


2 changes: 1 addition & 1 deletion src/tools/clippy/clippy_lints/src/utils/author.rs
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ impl<'a, 'tcx> PrintVisitor<'a, 'tcx> {
self.qpath(qpath);
}
self.expr(field!(let_expr.init));
}
},
ExprKind::Box(inner) => {
bind!(self, inner);
kind!("Box({inner})");
Expand Down
4 changes: 1 addition & 3 deletions src/tools/clippy/clippy_utils/src/hir_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,7 @@ impl<'a, 'tcx> SpanlessHash<'a, 'tcx> {
}
}
},
ExprKind::Let(Let {
pat, init, ty, ..
}) => {
ExprKind::Let(Let { pat, init, ty, .. }) => {
self.hash_expr(init);
if let Some(ty) = ty {
self.hash_ty(ty);
Expand Down

0 comments on commit fb5fd98

Please # to comment.