(&mut self, id: BranchId)
| 154 | } |
| 155 | |
| 156 | fn del_branch(&mut self, id: BranchId) -> Result<bool, Self::Error> { |
| 157 | if let Some(branch) = self.branches.remove(&id) { |
| 158 | if let Some(branches) = self.trunk_branches.get_mut(&branch.trunk()) { |
| 159 | branches.retain(|b| *b != id); |
| 160 | } |
| 161 | Ok(true) |
| 162 | } else { |
| 163 | Ok(false) |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | fn update_branch_state(&mut self, id: BranchId, state: BranchState) -> Result<(), Self::Error> { |
| 168 | if let Some(branch) = self.branches.get_mut(&id) { |