Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
pmnoxx committed Dec 24, 2021
1 parent 01b7411 commit 2a47dbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/methods/unwrap_or_else_default.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 2a47dbc

Please sign in to comment.