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

Method count

atomic-core/src/change/format_v3/semantic/predictive/encode.rs:53–59  ·  view source on GitHub ↗
(&mut self, role: usize)

Source from the content-addressed store, hash-verified

51 Ok(())
52 }
53 fn count(&mut self, role: usize) -> FormatResult<usize> {
54 let n = usize::try_from(self.n(role)?).map_err(|_| invalid("predictive count overflow"))?;
55 if n > self.input.len() {
56 return Err(invalid("predictive count exceeds control bytes"));
57 }
58 Ok(n)
59 }
60 fn bytes(&mut self, has_kind: bool) -> FormatResult<()> {
61 let tag = self.n(REFERENCE)?;
62 if tag > 2 {

Callers 3

firstFunction · 0.45
leavesMethod · 0.45
runMethod · 0.45

Calls 3

invalidFunction · 0.50
nMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected