MCPcopy Create free account
hub / github.com/QMHTMY/RustBook / insert

Method insert

publication/code/chapter10/cuckoofilter/src/bucket.rs:42–51  ·  view source on GitHub ↗
(&mut self, fp: FingerPrint)

Source from the content-addressed store, hash-verified

40 }
41
42 fn insert(&mut self, fp: FingerPrint) -> bool {
43 for bfp in &mut self.buffer {
44 if bfp.is_empty() {
45 *bfp = fp;
46 return true;
47 }
48 }
49
50 false
51 }
52
53 fn delete(&mut self, fp: FingerPrint) -> bool {
54 match self.get_fp_index(fp) {

Callers 4

try_insertFunction · 0.45
putFunction · 0.45
update_hmapMethod · 0.45
update_hmapMethod · 0.45

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected