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

Method list_branches

atomic-core/src/crdt/apply/leaf.rs:542–548  ·  view source on GitHub ↗
(&self, trunk_id: TrunkId)

Source from the content-addressed store, hash-verified

540 }
541
542 fn list_branches(&self, trunk_id: TrunkId) -> Result<Vec<BranchId>, Self::Error> {
543 Ok(self
544 .trunk_branches
545 .get(&trunk_id)
546 .cloned()
547 .unwrap_or_default())
548 }
549
550 fn count_branches(&self, trunk_id: TrunkId) -> Result<usize, Self::Error> {
551 Ok(self.trunk_branches.get(&trunk_id).map_or(0, |v| v.len()))

Callers

nothing calls this directly

Calls 1

getMethod · 0.65

Tested by

no test coverage detected