(&mut self, id: BranchId)
| 570 | } |
| 571 | |
| 572 | fn del_branch(&mut self, id: BranchId) -> Result<bool, Self::Error> { |
| 573 | if let Some(branch) = self.branches.remove(&id) { |
| 574 | if let Some(list) = self.trunk_branches.get_mut(&branch.trunk()) { |
| 575 | list.retain(|b| *b != id); |
| 576 | } |
| 577 | Ok(true) |
| 578 | } else { |
| 579 | Ok(false) |
| 580 | } |
| 581 | } |
| 582 | |
| 583 | fn update_branch_state( |
| 584 | &mut self, |