(&mut self, id: LeafId)
| 628 | } |
| 629 | |
| 630 | fn del_leaf(&mut self, id: LeafId) -> Result<bool, Self::Error> { |
| 631 | if let Some(leaf) = self.leaves.remove(&id) { |
| 632 | if let Some(list) = self.branch_leaves.get_mut(&leaf.branch()) { |
| 633 | list.retain(|l| *l != id); |
| 634 | } |
| 635 | Ok(true) |
| 636 | } else { |
| 637 | Ok(false) |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | fn update_leaf_state(&mut self, id: LeafId, state: LeafState) -> Result<(), Self::Error> { |
| 642 | if let Some(leaf) = self.leaves.get_mut(&id) { |