Skip to content

Commit

Permalink
Merge pull request #8 from SubconsciousCompute/rust-1.70
Browse files Browse the repository at this point in the history
add support for rust version 1.70.0
  • Loading branch information
tomtomwombat authored Oct 20, 2024
2 parents 97e51c2 + 6250b89 commit 580a8cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "fastbloom"
version = "0.7.1"
edition = "2021"
rust-version = "1.70.0"
authors = ["tomtomwombat"]
description = "The fastest Bloom filter in Rust. No accuracy compromises. Compatible with any hasher."
license = "MIT OR Apache-2.0"
Expand Down Expand Up @@ -31,5 +32,5 @@ wide = "0.7.15"

[dev-dependencies]
rand = "0.8.5"
rand_regex = "0.16.0"
rand_regex = "0.15.1"
ahash = "0.8.6"
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ impl BloomFilter {
num_bits: usize,
) -> BuilderWithBits<BLOCK_SIZE_BITS> {
assert!(num_bits > 0);
let num_u64s = num_bits.div_ceil(64);
// Only available in rust 1.73+
// let num_u64s = num_bits.div_ceil(64);
let num_u64s = (num_bits + 64 - 1) / 64;
BuilderWithBits::<BLOCK_SIZE_BITS> {
data: vec![0; num_u64s],
hasher: Default::default(),
Expand Down

0 comments on commit 580a8cb

Please sign in to comment.