diff --git a/src/extract/global_greedy_dag.rs b/src/extract/global_greedy_dag.rs index 4bb35b9..44e5c60 100644 --- a/src/extract/global_greedy_dag.rs +++ b/src/extract/global_greedy_dag.rs @@ -88,6 +88,7 @@ impl TermDag { .unwrap(); let mut cost = node_cost + self.total_cost(children[biggest_child]); + // wrap in a box so that we can mutate it during the loop let mut reachable = Box::new(self.info[children[biggest_child]].reachable.clone()); let next_id = self.nodes.len();