From b4c25f17cd8d75f05123928e47f44dd56275749f Mon Sep 17 00:00:00 2001 From: IshitaTakeshi Date: Wed, 15 May 2024 18:02:22 +0900 Subject: Make this crate work with no-std --- src/knn.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/knn.rs') diff --git a/src/knn.rs b/src/knn.rs index 444c9a7..97e121d 100644 --- a/src/knn.rs +++ b/src/knn.rs @@ -2,6 +2,8 @@ use crate::distance::{Distance, Proximity}; +use alloc::vec::Vec; + /// A nearest neighbor. #[derive(Clone, Copy, Debug)] pub struct Neighbor { @@ -351,6 +353,8 @@ pub mod tests { use rand::prelude::*; + use alloc::vec; + type Point = Euclidean<[f32; 3]>; /// Test an [ExactNeighbors] implementation. -- cgit v1.2.3