From 2a47dbc7a67ff691ccfddc7b01d07639215c900b Mon Sep 17 00:00:00 2001 From: Piotr Mikulski Date: Thu, 23 Dec 2021 22:12:08 -0800 Subject: [PATCH] Simplify code --- clippy_lints/src/methods/unwrap_or_else_default.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/methods/unwrap_or_else_default.rs b/clippy_lints/src/methods/unwrap_or_else_default.rs index e641b5c45994..f3af281d6cac 100644 --- a/clippy_lints/src/methods/unwrap_or_else_default.rs +++ b/clippy_lints/src/methods/unwrap_or_else_default.rs @@ -2,7 +2,7 @@ use super::UNWRAP_OR_ELSE_DEFAULT; use clippy_utils::{ - diagnostics::span_lint_and_sugg, is_default_equivalent_call, is_trait_item, source::snippet_with_applicability, + diagnostics::span_lint_and_sugg, is_default_equivalent_call, source::snippet_with_applicability, ty::is_type_diagnostic_item, }; use rustc_errors::Applicability; @@ -25,7 +25,7 @@ pub(super) fn check<'tcx>( if_chain! { if is_option || is_result; - if is_trait_item(cx, u_arg, sym::Default) || is_default_equivalent_call(cx, u_arg); + if is_default_equivalent_call(cx, u_arg); then { let mut applicability = Applicability::MachineApplicable;