Apply suggestions for clippy 1.68
This commit is contained in:
parent
d51b99beb3
commit
53dd4e3a6b
|
@ -10,7 +10,6 @@ benchmark_group!(benches, build_heuristic);
|
||||||
fn build_heuristic(bench: &mut Bencher) {
|
fn build_heuristic(bench: &mut Bencher) {
|
||||||
let mut rng = StdRng::seed_from_u64(SEED);
|
let mut rng = StdRng::seed_from_u64(SEED);
|
||||||
let points = (0..1024)
|
let points = (0..1024)
|
||||||
.into_iter()
|
|
||||||
.map(|_| Point(rng.gen(), rng.gen()))
|
.map(|_| Point(rng.gen(), rng.gen()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,6 @@ use instant_distance::{Builder, Point as _, Search};
|
||||||
#[allow(clippy::float_cmp, clippy::approx_constant)]
|
#[allow(clippy::float_cmp, clippy::approx_constant)]
|
||||||
fn map() {
|
fn map() {
|
||||||
let points = (0..5)
|
let points = (0..5)
|
||||||
.into_iter()
|
|
||||||
.map(|i| Point(i as f32, i as f32))
|
.map(|i| Point(i as f32, i as f32))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let values = vec!["zero", "one", "two", "three", "four"];
|
let values = vec!["zero", "one", "two", "three", "four"];
|
||||||
|
@ -57,7 +56,6 @@ fn randomized(builder: Builder) -> (u64, usize) {
|
||||||
let seed = ThreadRng::default().gen::<u64>();
|
let seed = ThreadRng::default().gen::<u64>();
|
||||||
let mut rng = StdRng::seed_from_u64(seed);
|
let mut rng = StdRng::seed_from_u64(seed);
|
||||||
let points = (0..1024)
|
let points = (0..1024)
|
||||||
.into_iter()
|
|
||||||
.map(|_| Point(rng.gen(), rng.gen()))
|
.map(|_| Point(rng.gen(), rng.gen()))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue