From 8b4a72c60c13955a8680a50c995cb288d36bf722 Mon Sep 17 00:00:00 2001 From: Aaron Fenyes Date: Mon, 3 Mar 2025 15:15:30 -0800 Subject: [PATCH] Simplify `match` to `if let` --- app-proto/src/assembly.rs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app-proto/src/assembly.rs b/app-proto/src/assembly.rs index 002b420..f9b4620 100644 --- a/app-proto/src/assembly.rs +++ b/app-proto/src/assembly.rs @@ -292,15 +292,12 @@ impl Assembly { self.regulators.with_untracked(|regs| { for (_, reg) in regs { reg.set_point.with_untracked(|set_pt| { - match set_pt { - Absent => (), - Present { value, .. } => { - let subjects = reg.subjects; - let row = elts[subjects.0].column_index.unwrap(); - let col = elts[subjects.1].column_index.unwrap(); - gram_to_be.push_sym(row, col, *value); - } - }; + if let Present { value, .. } = set_pt { + let subjects = reg.subjects; + let row = elts[subjects.0].column_index.unwrap(); + let col = elts[subjects.1].column_index.unwrap(); + gram_to_be.push_sym(row, col, *value); + } }); } });