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