summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--benches/benches.rs2
-rw-r--r--src/cos.rs2
-rw-r--r--src/euclid.rs2
-rw-r--r--src/exhaustive.rs2
-rw-r--r--src/kd.rs2
-rw-r--r--src/knn.rs4
-rw-r--r--src/vp.rs1
8 files changed, 1 insertions, 16 deletions
diff --git a/Cargo.toml b/Cargo.toml
index b7743a1..2132b69 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,7 +2,7 @@
name = "acap"
version = "0.2.0"
authors = ["Tavian Barnes <tavianator@tavianator.com>"]
-edition = "2018"
+edition = "2021"
description = "As Close As Possible — nearest neighbor search in Rust."
readme = "README.md"
repository = "https://github.com/tavianator/acap"
diff --git a/benches/benches.rs b/benches/benches.rs
index 07d21b3..e0001ac 100644
--- a/benches/benches.rs
+++ b/benches/benches.rs
@@ -8,8 +8,6 @@ use acap::vp::{FlatVpTree, VpTree};
use criterion::{black_box, criterion_group, criterion_main, BatchSize, Criterion};
-use std::iter::FromIterator;
-
type Point = Euclidean<[f32; 3]>;
/// Generates a spiral used as the benchmark data set.
diff --git a/src/cos.rs b/src/cos.rs
index a3a4f6c..1520c41 100644
--- a/src/cos.rs
+++ b/src/cos.rs
@@ -7,7 +7,6 @@ use num_traits::real::Real;
use num_traits::{one, zero};
use std::cmp::Ordering;
-use std::convert::TryFrom;
/// Compute the [cosine *similarity*] between two points.
///
@@ -398,7 +397,6 @@ where
///
/// # use acap::distance::Distance;
/// # use acap::cos::AngularDistance;
-/// # use std::convert::TryFrom;
/// let zero = AngularDistance::from_cos(1.0);
/// let pi_2 = AngularDistance::from_cos(0.0);
/// let pi = AngularDistance::from_cos(-1.0);
diff --git a/src/euclid.rs b/src/euclid.rs
index 3ec0af9..e1ee3c9 100644
--- a/src/euclid.rs
+++ b/src/euclid.rs
@@ -7,7 +7,6 @@ use crate::lp::Minkowski;
use num_traits::zero;
use std::cmp::Ordering;
-use std::convert::TryFrom;
/// A point in Euclidean space.
///
@@ -155,7 +154,6 @@ where
///
/// # use acap::distance::Distance;
/// # use acap::euclid::EuclideanDistance;
-/// # use std::convert::TryFrom;
/// let a = EuclideanDistance::try_from(3).unwrap();
/// let b = EuclideanDistance::try_from(4).unwrap();
/// let c = EuclideanDistance::from_squared(a.squared_value() + b.squared_value());
diff --git a/src/exhaustive.rs b/src/exhaustive.rs
index 3f42876..7b63ef7 100644
--- a/src/exhaustive.rs
+++ b/src/exhaustive.rs
@@ -3,8 +3,6 @@
use crate::distance::Proximity;
use crate::knn::{ExactNeighbors, NearestNeighbors, Neighborhood};
-use std::iter::FromIterator;
-
/// A [`NearestNeighbors`] implementation that does exhaustive search.
#[derive(Clone, Debug)]
pub struct ExhaustiveSearch<T>(Vec<T>);
diff --git a/src/kd.rs b/src/kd.rs
index 3c3699a..d9bed6a 100644
--- a/src/kd.rs
+++ b/src/kd.rs
@@ -8,8 +8,6 @@ use crate::util::Ordered;
use num_traits::Signed;
-use std::iter::FromIterator;
-
/// A node in a k-d tree.
#[derive(Debug)]
struct KdNode<T> {
diff --git a/src/knn.rs b/src/knn.rs
index 1cc1f39..444c9a7 100644
--- a/src/knn.rs
+++ b/src/knn.rs
@@ -2,8 +2,6 @@
use crate::distance::{Distance, Proximity};
-use std::convert::TryInto;
-
/// A nearest neighbor.
#[derive(Clone, Copy, Debug)]
pub struct Neighbor<V, D> {
@@ -353,8 +351,6 @@ pub mod tests {
use rand::prelude::*;
- use std::iter::FromIterator;
-
type Point = Euclidean<[f32; 3]>;
/// Test an [ExactNeighbors] implementation.
diff --git a/src/vp.rs b/src/vp.rs
index 4417b6b..a761cbf 100644
--- a/src/vp.rs
+++ b/src/vp.rs
@@ -7,7 +7,6 @@ use crate::util::Ordered;
use num_traits::zero;
use std::fmt::{self, Debug, Formatter};
-use std::iter::{Extend, FromIterator};
/// A node in a VP tree.
#[derive(Debug)]