diff options
| author | Piotr Mikulski <piotr@near.org> | 2021-12-23 22:12:08 -0800 |
|---|---|---|
| committer | Piotr Mikulski <piotr@near.org> | 2021-12-23 22:12:08 -0800 |
| commit | 2a47dbc7a67ff691ccfddc7b01d07639215c900b (patch) | |
| tree | 1118d2b7225a83aacd36d232982ea6b4b01fe238 | |
| parent | 01b74114824b4e0f6b94986dd93a6f481e29936c (diff) | |
| download | rust-2a47dbc7a67ff691ccfddc7b01d07639215c900b.tar.gz rust-2a47dbc7a67ff691ccfddc7b01d07639215c900b.zip | |
Simplify code
| -rw-r--r-- | clippy_lints/src/methods/unwrap_or_else_default.rs | 4 |
1 files 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 e641b5c4599..f3af281d6ca 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; |
