Skip to content

Commit

Permalink
fix(deps): update rust crate bloomfilter to v3 (#1795)
Browse files Browse the repository at this point in the history
* fix(deps): update rust crate bloomfilter to v3

* fix(shadowsocks): PingPongBloom supports bloomfilter v3

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: zonyitoo <[email protected]>
  • Loading branch information
renovate[bot] and zonyitoo authored Dec 3, 2024
1 parent 395920e commit 371af48
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
11 changes: 2 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/shadowsocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ url = "2.5"
once_cell = "1.17"
spin = { version = "0.9", features = ["std"] }
pin-project = "1.1"
bloomfilter = { version = "2.0.0", optional = true }
bloomfilter = { version = "3.0.0", optional = true }
thiserror = "2.0"
rand = { version = "0.8", optional = true }
lru_time_cache = { version = "0.11", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/shadowsocks/src/security/replay/ppbloom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl PingPongBloom {

PingPongBloom {
blooms: [
Bloom::new_for_fp_rate(item_count, fp_p),
Bloom::new_for_fp_rate(item_count, fp_p),
Bloom::new_for_fp_rate(item_count, fp_p).expect("BloomFilter1"),
Bloom::new_for_fp_rate(item_count, fp_p).expect("BloomFilter2"),
],
bloom_count: [0, 0],
item_count,
Expand Down

0 comments on commit 371af48

Please sign in to comment.