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| {
|
self.regulators.with_untracked(|regs| {
|
||||||
for (_, reg) in regs {
|
for (_, reg) in regs {
|
||||||
reg.set_point.with_untracked(|set_pt| {
|
reg.set_point.with_untracked(|set_pt| {
|
||||||
match set_pt {
|
if let Present { value, .. } = set_pt {
|
||||||
Absent => (),
|
let subjects = reg.subjects;
|
||||||
Present { value, .. } => {
|
let row = elts[subjects.0].column_index.unwrap();
|
||||||
let subjects = reg.subjects;
|
let col = elts[subjects.1].column_index.unwrap();
|
||||||
let row = elts[subjects.0].column_index.unwrap();
|
gram_to_be.push_sym(row, col, *value);
|
||||||
let col = elts[subjects.1].column_index.unwrap();
|
}
|
||||||
gram_to_be.push_sym(row, col, *value);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue