minor tweak

This commit is contained in:
Mark Thom
2017-02-28 13:33:28 -07:00
parent 6822be4bc9
commit 97f6bee8c3

View File

@@ -360,15 +360,13 @@ impl<'a> CodeGenerator<'a> {
{ {
for term in iter { for term in iter {
if let TermRef::Var(_, reg_cell, var) = term { if let TermRef::Var(_, reg_cell, var) = term {
let mut status = let mut status = vs.entry(var)
vs.entry(var) .or_insert((TermStatus::New, Vec::new()));
.or_insert((TermStatus::New, Vec::new()));
status.1.push(reg_cell); status.1.push(reg_cell);
match status.0 { match status.0 {
TermStatus::Old | TermStatus::Recurrent => TermStatus::Old => status.0 = TermStatus::Recurrent,
status.0 = TermStatus::Recurrent,
_ => {} _ => {}
}; };
} }