Skip to content

Commit dcaf974

Browse files
committed
fix merge
1 parent f97d38e commit dcaf974

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

clippy_lints/src/manual_unwrap_or_default.rs

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -131,23 +131,13 @@ fn handle<'tcx>(cx: &LateContext<'tcx>, if_let_or_match: IfLetOrMatch<'tcx>, exp
131131
},
132132
};
133133

134-
<<<<<<< HEAD
135-
// // We check if the expression is not a None variant
136-
if let Some(none_def_id) = cx.tcx.lang_items().option_none_variant() {
137-
if let ExprKind::Path(QPath::Resolved(_, path)) = &condition.kind {
138-
if let Some(def_id) = path.res.opt_def_id() {
139-
if cx.tcx.parent(def_id) == none_def_id {
140-
return;
141-
}
142-
=======
143134
// We check if the condition is not a None variant
144-
let none_def_id = cx.tcx.lang_items().option_none_variant().unwrap();
145-
if let ExprKind::Path(QPath::Resolved(_, path)) = &condition.kind {
135+
let none_def_id = cx.tcx.lang_items().option_none_variant().unwrap();
136+
if let ExprKind::Path(QPath::Resolved(_, path)) = &condition.kind {
146137
if let Some(def_id) = path.res.opt_def_id() {
147-
if cx.tcx.parent(def_id) == none_def_id {
138+
if cx.tcx.parent(def_id) == none_def_id {
148139
dbg!("found none");
149-
return;
150-
>>>>>>> refs/remotes/origin/master
140+
return;
151141
}
152142
}
153143
}

0 commit comments

Comments
 (0)