(&mut self, id: LeafId)
| 571 | } |
| 572 | |
| 573 | fn del_leaf(&mut self, id: LeafId) -> Result<bool, Self::Error> { |
| 574 | if let Some(leaf) = self.leaves.remove(&id) { |
| 575 | if let Some(list) = self.branch_leaves.get_mut(&leaf.branch()) { |
| 576 | list.retain(|l| *l != id); |
| 577 | } |
| 578 | Ok(true) |
| 579 | } else { |
| 580 | Ok(false) |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | fn update_leaf_state(&mut self, id: LeafId, state: LeafState) -> Result<(), Self::Error> { |
| 585 | if let Some(leaf) = self.leaves.get_mut(&id) { |