diff options
Diffstat (limited to 'chain/src/item/reduction.rs')
| -rw-r--r-- | chain/src/item/reduction.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chain/src/item/reduction.rs b/chain/src/item/reduction.rs index 8f7471c..e1a3504 100644 --- a/chain/src/item/reduction.rs +++ b/chain/src/item/reduction.rs @@ -267,7 +267,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> { stack.push(top); stack.extend( self.children_of(top)? - .filter(|child| correct_ends.get(child).is_none()), + .filter(|child| !correct_ends.contains_key(child)), ); } else if !inserted { correct_ends.insert(top, Incorrect); @@ -320,7 +320,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> { stack.push(top); stack.extend( self.children_of(top)? - .filter(|child| correct_ends.get(child).is_none()), + .filter(|child| !correct_ends.contains_key(child)), ); } else if !inserted { correct_ends.insert(top, Incorrect); @@ -350,7 +350,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> { panic!("a terminal node {top} has no ending position?"); } Some(TNT::Non(nt)) => { - self.close_pavi(atom.borrow(), PaVi::Virtual(nt, ter, top), pos)?; + self.close_pavi(atom, PaVi::Virtual(nt, ter, top), pos)?; // dbg!(top, nt, ter, pos, self.degree(top)?, degree); |
