Skip to content

Commit

Permalink
Merge pull request #299 from RoaringBitmap/bump-msrv-1-67
Browse files Browse the repository at this point in the history
Bump the MSRV to v1.67
  • Loading branch information
Kerollmops authored Nov 13, 2024
2 parents 9587082 + c3ef874 commit dd8bc5a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- stable
- beta
- nightly
- 1.66.0
- 1.67.0
env:
RUSTFLAGS: "-C target-cpu=native -C opt-level=3"
ROARINGRS_BENCH_OFFLINE: "true"
Expand Down
10 changes: 5 additions & 5 deletions benchmarks/benches/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fn pairwise_binary_op_matrix(
mut op_assign_ref: impl FnMut(&mut RoaringBitmap, &RoaringBitmap),
op_len: impl Fn(&RoaringBitmap, &RoaringBitmap) -> u64,
) {
let mut group = c.benchmark_group(format!("pairwise_{}", op_name));
let mut group = c.benchmark_group(format!("pairwise_{op_name}"));

for dataset in Datasets {
let pairs = dataset.bitmaps.iter().cloned().tuple_windows::<(_, _)>().collect::<Vec<_>>();
Expand Down Expand Up @@ -652,15 +652,15 @@ fn insert_range_bitmap(c: &mut Criterion) {
for &size in &[10, 100, 1_000, 5_000, 10_000, 20_000] {
let mut group = c.benchmark_group("insert_range");
group.throughput(criterion::Throughput::Elements(size as u64));
group.bench_function(format!("from_empty_{}", size), |b| {
group.bench_function(format!("from_empty_{size}"), |b| {
let bm = RoaringBitmap::new();
b.iter_batched(
|| bm.clone(),
|mut bm| black_box(bm.insert_range(0..size)),
criterion::BatchSize::SmallInput,
)
});
group.bench_function(format!("pre_populated_{}", size), |b| {
group.bench_function(format!("pre_populated_{size}"), |b| {
let mut bm = RoaringBitmap::new();
bm.insert_range(0..size);
b.iter_batched(
Expand All @@ -676,15 +676,15 @@ fn insert_range_treemap(c: &mut Criterion) {
for &size in &[1_000_u64, 10_000u64, 2 * (u32::MAX as u64)] {
let mut group = c.benchmark_group("insert_range_treemap");
group.throughput(criterion::Throughput::Elements(size));
group.bench_function(format!("from_empty_{}", size), |b| {
group.bench_function(format!("from_empty_{size}"), |b| {
let bm = RoaringTreemap::new();
b.iter_batched(
|| bm.clone(),
|mut bm| black_box(bm.insert_range(0..size)),
criterion::BatchSize::SmallInput,
)
});
group.bench_function(format!("pre_populated_{}", size), |b| {
group.bench_function(format!("pre_populated_{size}"), |b| {
let mut bm = RoaringTreemap::new();
bm.insert_range(0..size);
b.iter_batched(
Expand Down
4 changes: 2 additions & 2 deletions roaring/src/bitmap/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ mod test {
impl Debug for Store {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
match self {
Store::Array(a) => write!(f, "Store({:?})", a),
Store::Bitmap(b) => write!(f, "Store({:?})", b),
Store::Array(a) => write!(f, "Store({a:?})"),
Store::Bitmap(b) => write!(f, "Store({b:?})"),
}
}
}
Expand Down
5 changes: 2 additions & 3 deletions roaring/src/bitmap/inherent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ mod tests {

// Assert all values in the range are present
for i in r.clone() {
assert!(b.contains(i), "does not contain {}", i);
assert!(b.contains(i), "does not contain {i}");
}

// Run the check values looking for any false positives
Expand All @@ -702,8 +702,7 @@ mod tests {
let range_has = r.contains(&i);
assert_eq!(
bitmap_has, range_has,
"value {} in bitmap={} and range={}",
i, bitmap_has, range_has
"value {i} in bitmap={bitmap_has} and range={range_has}"
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion roaring/src/bitmap/store/bitmap_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
match self.kind {
ErrorKind::Cardinality { expected, actual } => {
write!(f, "Expected cardinality was {} but was {}", expected, actual)
write!(f, "Expected cardinality was {expected} but was {actual}")
}
}
}
Expand Down

0 comments on commit dd8bc5a

Please sign in to comment.