Adopt let else in more places

This commit is contained in:
est31 2022-02-19 00:48:49 +01:00
parent b8c56fa8c3
commit 2ef8af6619
132 changed files with 539 additions and 881 deletions

View file

@ -26,9 +26,8 @@ impl<'tcx> MirPass<'tcx> for RemoveZsts {
if !maybe_zst(place_ty) {
continue;
}
let layout = match tcx.layout_of(param_env.and(place_ty)) {
Ok(layout) => layout,
Err(_) => continue,
let Ok(layout) = tcx.layout_of(param_env.and(place_ty)) else {
continue;
};
if !layout.is_zst() {
continue;