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

Method count_branches

atomic-core/tests/crdt_integration_test.rs:182–188  ·  view source on GitHub ↗
(&self, trunk_id: TrunkId)

Source from the content-addressed store, hash-verified

180 }
181
182 fn count_branches(&self, trunk_id: TrunkId) -> Result<usize, Self::Error> {
183 Ok(self
184 .trunk_branches
185 .get(&trunk_id)
186 .map(|v| v.len())
187 .unwrap_or(0))
188 }
189
190 fn put_leaf(&mut self, leaf: &Leaf, after: Option<LeafId>) -> Result<bool, Self::Error> {
191 let id = leaf.id();

Callers

nothing calls this directly

Calls 2

getMethod · 0.65
lenMethod · 0.45

Tested by

no test coverage detected