Skip to content

Commit bde78c6

Browse files
committed
Use then_some in meet
1 parent d475a76 commit bde78c6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

clippy_utils/src/ty/type_certainty/certainty.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,7 @@ impl Meet for Option<DefId> {
2727
fn meet(self, other: Self) -> Self {
2828
match (self, other) {
2929
(None, _) | (_, None) => None,
30-
(Some(lhs), Some(rhs)) => {
31-
if lhs == rhs {
32-
Some(lhs)
33-
} else {
34-
None
35-
}
36-
},
30+
(Some(lhs), Some(rhs)) => (lhs == rhs).then_some(lhs),
3731
}
3832
}
3933
}

0 commit comments

Comments
 (0)