Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/QMHTMY/RustBook
/ main
Function
main
publication/code/chapter10/bloom_filter.rs:73–79 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
71
}
72
73
fn main() {
74
let mut bf = BloomFilter::new(100, 0.08);
75
(0..20).for_each(|i| bf.insert(&i));
76
let res1 = bf.contains(&2);
77
let res2 = bf.contains(&200);
78
println!(
"2 in bf: {res1}, 200 in bf: {res2}"
);
79
}
Callers
nothing calls this directly
Calls
2
insert
Method · 0.45
contains
Method · 0.45
Tested by
no test coverage detected