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

Method n

atomic-core/src/change/format_v3/graph_fields/encode.rs:18–27  ·  view source on GitHub ↗
(&mut self, role: usize, n: u64)

Source from the content-addressed store, hash-verified

16}
17impl Encoder {
18 fn n(&mut self, role: usize, n: u64) {
19 let (previous, data, count, constant) = self.columns.entry(role).or_default();
20 if *count == 0 {
21 *constant = Some(n);
22 } else if *constant != Some(n) {
23 *constant = None;
24 }
25 *count += 1;
26 previous.write(data, n);
27 }
28 fn position(&mut self, role: usize, p: CompactPosition) {
29 self.n(role, p.change.into());
30 self.n(role + 1, p.pos.into());

Callers 5

positionMethod · 0.45
pathMethod · 0.45
localMethod · 0.45
insertionMethod · 0.45
edgesMethod · 0.45

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected