From 4b3a87f8866bf0a76a7fd63d35331be5566db791 Mon Sep 17 00:00:00 2001 From: Piotr Mikulski <piotr@near.org> Date: Thu, 23 Dec 2021 21:47:31 -0800 Subject: [PATCH] clippy --- clippy_lints/src/methods/unwrap_or_else_default.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/clippy_lints/src/methods/unwrap_or_else_default.rs b/clippy_lints/src/methods/unwrap_or_else_default.rs index cde707790ef..14185503092 100644 --- a/clippy_lints/src/methods/unwrap_or_else_default.rs +++ b/clippy_lints/src/methods/unwrap_or_else_default.rs @@ -26,13 +26,8 @@ pub(super) fn check<'tcx>( let is_default_eq = match &u_arg.kind { hir::ExprKind::Path(qpath) => { if let Some(repl_def_id) = cx.qpath_res(qpath, u_arg.hir_id).opt_def_id() { - if is_diag_trait_item(cx, repl_def_id, sym::Default) + is_diag_trait_item(cx, repl_def_id, sym::Default) || is_default_equivalent_ctor(cx, repl_def_id, qpath) - { - true - } else { - false - } } else { false }