MCPcopy Create free account
hub / github.com/Freaky/Compactor / insert

Method insert

hashfilter/src/lib.rs:97–106  ·  view source on GitHub ↗
(&mut self, data: H)

Source from the content-addressed store, hash-verified

95 }
96
97 pub fn insert<H: Hash>(&mut self, data: H) -> bool {
98 let key = Self::key_for(data);
99
100 if self.filter.insert(key) {
101 self.pending.push(key);
102 return true;
103 }
104
105 false
106 }
107
108 pub fn contains<H: Hash>(&self, data: H) -> bool {
109 self.filter.contains(&Self::key_for(data))

Callers 3

compress_loopMethod · 0.80
loadMethod · 0.80
it_seems_to_workFunction · 0.80

Calls 1

pushMethod · 0.80

Tested by 1

it_seems_to_workFunction · 0.64