Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrobbel committed Jan 27, 2023
1 parent 070406e commit 0d5ebd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benches/narrow/bitmap/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub(super) fn bench(c: &mut Criterion) {
.collect::<Vec<_>>();
group.throughput(Throughput::Elements(size as u64));
group.bench_with_input(
BenchmarkId::new("narrow", format!("{}/{}", size, null_fraction)),
BenchmarkId::new("narrow", format!("{size}/{null_fraction}")),
&input,
|b, input| b.iter(|| Bitmap::<Vec<u8>>::from_iter(input)),
);
Expand All @@ -36,7 +36,7 @@ pub(super) fn bench(c: &mut Criterion) {
let narrow_bitmap = Bitmap::<Vec<u8>>::from_iter(&input);
group.throughput(Throughput::Elements(size as u64));
group.bench_with_input(
BenchmarkId::new("narrow", format!("{}/{}", size, null_fraction)),
BenchmarkId::new("narrow", format!("{size}/{null_fraction}")),
&narrow_bitmap,
|b, input| b.iter(|| Vec::<bool>::from_iter(input)),
);
Expand Down
2 changes: 1 addition & 1 deletion src/bitmap/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub(crate) struct BitsDisplay<'a>(&'a [u8]);
impl Display for BitsDisplay<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> Result {
f.debug_list()
.entries(self.0.iter().map(|byte| format!("{:08b}", byte)))
.entries(self.0.iter().map(|byte| format!("{byte:08b}")))
.finish()
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/bitmap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ where
#[cold]
#[inline(never)]
fn assert_failed(index: usize, len: usize) -> ! {
panic!("index (is {}) should be < len (is {})", index, len);
panic!("index (is {index}) should be < len (is {len})");
}

let len = self.bits;
Expand Down

0 comments on commit 0d5ebd4

Please sign in to comment.