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

Method small_number

atomic-core/examples/graph_codec_lab/codec.rs:174–181  ·  view source on GitHub ↗
(&mut self, kind: u8, n: u64)

Source from the content-addressed store, hash-verified

172 }
173 }
174 fn small_number(&mut self, kind: u8, n: u64) -> SResult<()> {
175 if n < 16 {
176 self.c.control.push(n as u8);
177 Ok(())
178 } else {
179 self.number(kind, n)
180 }
181 }
182 fn reference(&mut self, bytes: &[u8], tag: u8) -> SResult<()> {
183 let next = self.c.dictionary.len();
184 let id = if let Some(&id) = self.dictionary.get(bytes) {

Callers 6

elementMethod · 0.80
serialize_seqMethod · 0.80
serialize_mapMethod · 0.80

Calls 2

numberMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected