From d64807aab65a4e25012c639b28d5ac60e24dac32 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 21 Oct 2021 14:01:21 -0400 Subject: Bump the edition to 2021 --- src/cos.rs | 2 -- src/euclid.rs | 2 -- src/exhaustive.rs | 2 -- src/kd.rs | 2 -- src/knn.rs | 4 ---- src/vp.rs | 1 - 6 files changed, 13 deletions(-) (limited to 'src') 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(Vec); 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 { 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 { @@ -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)] -- cgit v1.2.3