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

Method del_branch

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

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 3

get_mutMethod · 0.80
removeMethod · 0.65
trunkMethod · 0.45

Tested by

no test coverage detected