Skip to content

Commit 50abde2

Browse files
committed
Fix dogfood
1 parent 66afdd1 commit 50abde2

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

clippy_lints/src/main_recursion.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ impl LateLintPass<'_> for MainRecursion {
4343

4444
if_chain! {
4545
if let ExprKind::Call(func, _) = &expr.kind;
46-
if let ExprKind::Path(path) = &func.kind;
47-
if let QPath::Resolved(_, path) = &path;
46+
if let ExprKind::Path(QPath::Resolved(_, path)) = &func.kind;
4847
if let Some(def_id) = path.res.opt_def_id();
4948
if is_entrypoint_fn(cx, def_id);
5049
then {

clippy_lints/src/ptr.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,7 @@ fn check_fn(cx: &LateContext<'_>, decl: &FnDecl<'_>, fn_id: HirId, opt_body_id:
263263
} else if match_type(cx, ty, &paths::COW) {
264264
if_chain! {
265265
if let TyKind::Rptr(_, MutTy { ref ty, ..} ) = arg.kind;
266-
if let TyKind::Path(ref path) = ty.kind;
267-
if let QPath::Resolved(None, ref pp) = *path;
266+
if let TyKind::Path(QPath::Resolved(None, ref pp)) = ty.kind;
268267
if let [ref bx] = *pp.segments;
269268
if let Some(ref params) = bx.args;
270269
if !params.parenthesized;

clippy_lints/src/utils/higher.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,7 @@ pub fn for_loop<'tcx>(
158158
/// `while cond { body }` becomes `(cond, body)`.
159159
pub fn while_loop<'tcx>(expr: &'tcx hir::Expr<'tcx>) -> Option<(&'tcx hir::Expr<'tcx>, &'tcx hir::Expr<'tcx>)> {
160160
if_chain! {
161-
if let hir::ExprKind::Loop(block, _, hir::LoopSource::While) = &expr.kind;
162-
if let hir::Block { expr: Some(expr), .. } = &**block;
161+
if let hir::ExprKind::Loop(hir::Block { expr: Some(expr), .. }, _, hir::LoopSource::While) = &expr.kind;
163162
if let hir::ExprKind::Match(cond, arms, hir::MatchSource::WhileDesugar) = &expr.kind;
164163
if let hir::ExprKind::DropTemps(cond) = &cond.kind;
165164
if let [hir::Arm { body, .. }, ..] = &arms[..];

clippy_lints/src/utils/mod.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1126,8 +1126,7 @@ pub fn is_self(slf: &Param<'_>) -> bool {
11261126

11271127
pub fn is_self_ty(slf: &hir::Ty<'_>) -> bool {
11281128
if_chain! {
1129-
if let TyKind::Path(ref qp) = slf.kind;
1130-
if let QPath::Resolved(None, ref path) = *qp;
1129+
if let TyKind::Path(QPath::Resolved(None, ref path)) = slf.kind;
11311130
if let Res::SelfTy(..) = path.res;
11321131
then {
11331132
return true

0 commit comments

Comments
 (0)