forked from StudioInfinity/dyna3
Simplify match
to if let
This commit is contained in:
parent
c58fed073d
commit
8b4a72c60c
1 changed files with 6 additions and 9 deletions
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue