From fab85ddbebcd99867344f05b610dc74709abbe6d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 9 Jun 2022 09:38:09 +1000 Subject: [PATCH] Inline and remove `fallback` closure. --- compiler/rustc_mir_build/src/thir/pattern/mod.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/compiler/rustc_mir_build/src/thir/pattern/mod.rs b/compiler/rustc_mir_build/src/thir/pattern/mod.rs index 1029d0903c7d..30c86355c882 100644 --- a/compiler/rustc_mir_build/src/thir/pattern/mod.rs +++ b/compiler/rustc_mir_build/src/thir/pattern/mod.rs @@ -759,8 +759,6 @@ pub(crate) fn compare_const_vals<'tcx>( let from_bool = |v: bool| v.then_some(Ordering::Equal); - let fallback = || from_bool(a == b); - if a == b { return from_bool(true); } @@ -792,5 +790,5 @@ pub(crate) fn compare_const_vals<'tcx>( }; } - fallback() + from_bool(a == b) }