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

Method insert

atomic-core/src/record/workflow/recipes/content_hash.rs:66–69  ·  view source on GitHub ↗

Insert a single line at `position`.

(&mut self, line: &[u8], position: usize)

Source from the content-addressed store, hash-verified

64
65 /// Insert a single line at `position`.
66 pub fn insert(&mut self, line: &[u8], position: usize) {
67 let h = hash_line(line);
68 self.buckets.entry(h).or_default().push(position);
69 }
70
71 /// Return all positions that hash to the same value as `line`.
72 ///

Callers 3

from_linesMethod · 0.45

Calls 2

hash_lineFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected