From 5cc292eb1dcb22bd6a46478165b5820f8177c87f Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 19 Feb 2022 00:47:43 +0100 Subject: rustc_const_eval: adopt let else in more places --- compiler/rustc_const_eval/src/util/alignment.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'compiler/rustc_const_eval/src/util/alignment.rs') diff --git a/compiler/rustc_const_eval/src/util/alignment.rs b/compiler/rustc_const_eval/src/util/alignment.rs index 73adc60577b..e4528b68907 100644 --- a/compiler/rustc_const_eval/src/util/alignment.rs +++ b/compiler/rustc_const_eval/src/util/alignment.rs @@ -15,12 +15,9 @@ where L: HasLocalDecls<'tcx>, { debug!("is_disaligned({:?})", place); - let pack = match is_within_packed(tcx, local_decls, place) { - None => { - debug!("is_disaligned({:?}) - not within packed", place); - return false; - } - Some(pack) => pack, + let Some(pack) = is_within_packed(tcx, local_decls, place) else { + debug!("is_disaligned({:?}) - not within packed", place); + return false; }; let ty = place.ty(local_decls, tcx).ty; -- cgit 1.4.1-3-g733a5