Use Option::then in two places
This commit is contained in:
parent
d5f9c40e6a
commit
08be313feb
2 changed files with 2 additions and 2 deletions
|
@ -264,7 +264,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
// The set of places that we are creating fake borrows of. If there are
|
// The set of places that we are creating fake borrows of. If there are
|
||||||
// no match guards then we don't need any fake borrows, so don't track
|
// no match guards then we don't need any fake borrows, so don't track
|
||||||
// them.
|
// them.
|
||||||
let mut fake_borrows = if match_has_guard { Some(FxHashSet::default()) } else { None };
|
let mut fake_borrows = match_has_guard.then(FxHashSet::default);
|
||||||
|
|
||||||
let mut otherwise = None;
|
let mut otherwise = None;
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ impl<K: DepKind> EncoderState<K> {
|
||||||
total_edge_count: 0,
|
total_edge_count: 0,
|
||||||
total_node_count: 0,
|
total_node_count: 0,
|
||||||
result: Ok(()),
|
result: Ok(()),
|
||||||
stats: if record_stats { Some(FxHashMap::default()) } else { None },
|
stats: record_stats.then(FxHashMap::default),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue