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_mir_build/src/build/matches/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/rustc_mir_build') diff --git a/compiler/rustc_mir_build/src/build/matches/mod.rs b/compiler/rustc_mir_build/src/build/matches/mod.rs index 3294f2cf641..1bf692cae6a 100644 --- a/compiler/rustc_mir_build/src/build/matches/mod.rs +++ b/compiler/rustc_mir_build/src/build/matches/mod.rs @@ -264,7 +264,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> { // 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 // 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; -- cgit 1.4.1-3-g733a5