Skip to content

Commit

Permalink
Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerollmops committed Nov 12, 2024
1 parent 05bd606 commit 283a51f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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
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 283a51f

Please sign in to comment.