about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPiotr Mikulski <piotr@near.org>2021-12-23 21:47:31 -0800
committerPiotr Mikulski <piotr@near.org>2021-12-23 21:47:31 -0800
commit4b3a87f8866bf0a76a7fd63d35331be5566db791 (patch)
tree9184022ee8c2102ed5d4fd0b9f64134b901648fc
parent8b19845ffb7b9b6fd760f0bf8066731028377237 (diff)
downloadrust-4b3a87f8866bf0a76a7fd63d35331be5566db791.tar.gz
rust-4b3a87f8866bf0a76a7fd63d35331be5566db791.zip
clippy
-rw-r--r--clippy_lints/src/methods/unwrap_or_else_default.rs7
1 files changed, 1 insertions, 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
             }