We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b19845 commit 4b3a87fCopy full SHA for 4b3a87f
clippy_lints/src/methods/unwrap_or_else_default.rs
@@ -26,13 +26,8 @@ pub(super) fn check<'tcx>(
26
let is_default_eq = match &u_arg.kind {
27
hir::ExprKind::Path(qpath) => {
28
if let Some(repl_def_id) = cx.qpath_res(qpath, u_arg.hir_id).opt_def_id() {
29
- if is_diag_trait_item(cx, repl_def_id, sym::Default)
+ is_diag_trait_item(cx, repl_def_id, sym::Default)
30
|| is_default_equivalent_ctor(cx, repl_def_id, qpath)
31
- {
32
- true
33
- } else {
34
- false
35
- }
36
} else {
37
false
38
}
0 commit comments