diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-10-21 14:01:21 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-10-24 10:51:11 -0400 |
commit | d64807aab65a4e25012c639b28d5ac60e24dac32 (patch) | |
tree | 4096be26b0b56331d477109b3a7a791d5f6aed6a /src | |
parent | bf2a10ca3b54ac3ed3dcc9c25cb1cf7f07ba8135 (diff) | |
download | acap-d64807aab65a4e25012c639b28d5ac60e24dac32.tar.xz |
Bump the edition to 2021
Diffstat (limited to 'src')
-rw-r--r-- | src/cos.rs | 2 | ||||
-rw-r--r-- | src/euclid.rs | 2 | ||||
-rw-r--r-- | src/exhaustive.rs | 2 | ||||
-rw-r--r-- | src/kd.rs | 2 | ||||
-rw-r--r-- | src/knn.rs | 4 | ||||
-rw-r--r-- | src/vp.rs | 1 |
6 files changed, 0 insertions, 13 deletions
@@ -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>); @@ -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> { @@ -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. @@ -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)] |