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

Method optional_branch

atomic-core/src/change/format_v3/semantic/encode.rs:53–58  ·  view source on GitHub ↗
(&mut self, id: Option<BranchId>)

Source from the content-addressed store, hash-verified

51 self.id(true, id.change_id().get(), id.branch_idx());
52 }
53 fn optional_branch(&mut self, id: Option<BranchId>) {
54 put(&mut self.c.control, u64::from(id.is_some()));
55 if let Some(id) = id {
56 self.branch(id);
57 }
58 }
59 fn bytes(&mut self, bytes: &[u8], offset: Option<usize>) {
60 let (tag, at) = if let Some(at) = offset {
61 (if at == self.s.cursor { 0 } else { 1 }, at)

Callers 1

lineMethod · 0.45

Calls 2

putFunction · 0.70
branchMethod · 0.45

Tested by

no test coverage detected