Replace some then
s with some then_some
s
This commit is contained in:
parent
8751fa1a9a
commit
5bf6a46032
24 changed files with 27 additions and 26 deletions
|
@ -254,7 +254,7 @@ impl<'a, 'tcx> Analysis<'tcx> for MaybeTransitiveLiveLocals<'a> {
|
|||
) {
|
||||
// Compute the place that we are storing to, if any
|
||||
let destination = match &statement.kind {
|
||||
StatementKind::Assign(assign) => assign.1.is_safe_to_remove().then(|| assign.0),
|
||||
StatementKind::Assign(assign) => assign.1.is_safe_to_remove().then_some(assign.0),
|
||||
StatementKind::SetDiscriminant { place, .. } | StatementKind::Deinit(place) => {
|
||||
Some(**place)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue