(&mut self, id: BranchId)
| 518 | } |
| 519 | |
| 520 | fn del_branch(&mut self, id: BranchId) -> Result<bool, Self::Error> { |
| 521 | if let Some(branch) = self.branches.remove(&id) { |
| 522 | if let Some(list) = self.trunk_branches.get_mut(&branch.trunk()) { |
| 523 | list.retain(|b| *b != id); |
| 524 | } |
| 525 | Ok(true) |
| 526 | } else { |
| 527 | Ok(false) |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | fn update_branch_state( |
| 532 | &mut self, |