Simplify match to if let

This commit is contained in:
Aaron Fenyes 2025-03-03 15:15:30 -08:00
parent c58fed073d
commit 8b4a72c60c

View file

@ -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);
}
});
}
});