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

Method del_branch

atomic-core/src/crdt/apply/branch.rs:572–581  ·  view source on GitHub ↗
(&mut self, id: BranchId)

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 3

get_mutMethod · 0.80
removeMethod · 0.65
trunkMethod · 0.45

Tested by

no test coverage detected