From 08be313febc8146a3a8f57d46b33602bdbd1d30e Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 2 Feb 2022 16:08:05 +0100 Subject: Use Option::then in two places --- compiler/rustc_query_system/src/dep_graph/serialized.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_query_system/src') diff --git a/compiler/rustc_query_system/src/dep_graph/serialized.rs b/compiler/rustc_query_system/src/dep_graph/serialized.rs index 283eda7c85e..c95dff13d66 100644 --- a/compiler/rustc_query_system/src/dep_graph/serialized.rs +++ b/compiler/rustc_query_system/src/dep_graph/serialized.rs @@ -182,7 +182,7 @@ impl EncoderState { 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), } } -- cgit 1.4.1-3-g733a5