Use Option::then in two places

This commit is contained in:
est31 2022-02-02 16:08:05 +01:00
parent d5f9c40e6a
commit 08be313feb
2 changed files with 2 additions and 2 deletions

View file

@ -182,7 +182,7 @@ impl<K: DepKind> EncoderState<K> {
total_edge_count: 0,
total_node_count: 0,
result: Ok(()),
stats: if record_stats { Some(FxHashMap::default()) } else { None },
stats: record_stats.then(FxHashMap::default),
}
}