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

Function main

code/chapter09/bloom_filter.rs:71–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

69}
70
71fn main() {
72 let mut bf = BloomFilter::new(100, 0.08);
73 (0..20).for_each(|i| bf.insert(&i));
74 let res1 = bf.contains(&2);
75 let res2 = bf.contains(&200);
76 println!("2 in bf: {res1}, 200 in bf: {res2}");
77}

Callers

nothing calls this directly

Calls 2

insertMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected