Skip to content

Commit 2a47dbc

Browse files
committed
Simplify code
1 parent 01b7411 commit 2a47dbc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clippy_lints/src/methods/unwrap_or_else_default.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
33
use super::UNWRAP_OR_ELSE_DEFAULT;
44
use clippy_utils::{
5-
diagnostics::span_lint_and_sugg, is_default_equivalent_call, is_trait_item, source::snippet_with_applicability,
5+
diagnostics::span_lint_and_sugg, is_default_equivalent_call, source::snippet_with_applicability,
66
ty::is_type_diagnostic_item,
77
};
88
use rustc_errors::Applicability;
@@ -25,7 +25,7 @@ pub(super) fn check<'tcx>(
2525

2626
if_chain! {
2727
if is_option || is_result;
28-
if is_trait_item(cx, u_arg, sym::Default) || is_default_equivalent_call(cx, u_arg);
28+
if is_default_equivalent_call(cx, u_arg);
2929
then {
3030
let mut applicability = Applicability::MachineApplicable;
3131

0 commit comments

Comments
 (0)