From c2f0b7503b61351b28a51295a984e0dc3c66dbae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 12 Nov 2024 11:48:37 +0100 Subject: [PATCH] Make clippy happy --- benchmarks/benches/lib.rs | 10 +++++----- roaring/src/bitmap/store/bitmap_store.rs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmarks/benches/lib.rs b/benchmarks/benches/lib.rs index b5c92882..34af68ba 100644 --- a/benchmarks/benches/lib.rs +++ b/benchmarks/benches/lib.rs @@ -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::>(); @@ -652,7 +652,7 @@ 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(), @@ -660,7 +660,7 @@ fn insert_range_bitmap(c: &mut Criterion) { 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( @@ -676,7 +676,7 @@ 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(), @@ -684,7 +684,7 @@ fn insert_range_treemap(c: &mut Criterion) { 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( diff --git a/roaring/src/bitmap/store/bitmap_store.rs b/roaring/src/bitmap/store/bitmap_store.rs index 91b432bc..aaeb99d6 100644 --- a/roaring/src/bitmap/store/bitmap_store.rs +++ b/roaring/src/bitmap/store/bitmap_store.rs @@ -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}") } } }