MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / del_branch

Method del_branch

atomic-core/tests/crdt_integration_test.rs:156–165  ·  view source on GitHub ↗
(&mut self, id: BranchId)

Source from the content-addressed store, hash-verified

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) {

Callers

nothing calls this directly

Calls 3

get_mutMethod · 0.80
removeMethod · 0.65
trunkMethod · 0.45

Tested by

no test coverage detected