Skip to content

Commit a614434

Browse files
committed
fix lints
1 parent c626ea2 commit a614434

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

crates/geo_filters/src/config/buckets.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ where
2121
fn into_block(self) -> u64 {
2222
assert!(
2323
self.into_usize() < BITS_PER_BLOCK,
24-
"position in block must be less then 64, got {:?}",
25-
self
24+
"position in block must be less then 64, got {self:?}",
2625
);
2726
1u64 << self.into_usize()
2827
}

crates/geo_filters/src/config/lookup.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ mod tests {
5454
#[test]
5555
fn test_lookup_7() {
5656
let var = lookup_random_hashes_variance::<7>(1 << 16);
57-
assert!(var < 1e-4, "variance {} too large", var);
57+
assert!(var < 1e-4, "variance {var} too large");
5858
}
5959

6060
#[test]
6161
fn test_lookup_13() {
6262
let var = lookup_random_hashes_variance::<13>(1 << 16);
63-
assert!(var < 1e-4, "variance {} too large", var);
63+
assert!(var < 1e-4, "variance {var} too large");
6464
}
6565

6666
fn lookup_random_hashes_variance<const B: usize>(n: u64) -> f64 {

crates/geo_filters/src/evaluation/simulation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ pub fn run_simulations(
9898
println!("Parameters:");
9999
println!();
100100
println!(" number of configs = {}", configs.len());
101-
println!(" number of samples = {}", samples);
101+
println!(" number of samples = {samples}");
102102
println!(" number of sets = {}", set_sizes.len());
103103
println!();
104104

@@ -107,7 +107,7 @@ pub fn run_simulations(
107107
let results = configs
108108
.iter()
109109
.map(|(name, f)| {
110-
print!(" {} ... ", name);
110+
print!(" {name} ... ");
111111
std::io::stdout().flush().expect("stdout can be flushed");
112112
let t = Instant::now();
113113
let result = simulate(f, samples, set_sizes);

crates/string-offsets/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ mod tests {
449449
0 => 0,
450450
1..=3 => 1,
451451
4 => 2,
452-
_ => panic!("invalid utf8 char width: {}", len),
452+
_ => panic!("invalid utf8 char width: {len}"),
453453
}
454454
}
455455

0 commit comments

Comments
 (0)