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

Method del_branch

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

Source from the content-addressed store, hash-verified

518 }
519
520 fn del_branch(&mut self, id: BranchId) -> Result<bool, Self::Error> {
521 if let Some(branch) = self.branches.remove(&id) {
522 if let Some(list) = self.trunk_branches.get_mut(&branch.trunk()) {
523 list.retain(|b| *b != id);
524 }
525 Ok(true)
526 } else {
527 Ok(false)
528 }
529 }
530
531 fn update_branch_state(
532 &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