summaryrefslogtreecommitdiffstats
path: root/src/metric/kd.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/metric/kd.rs')
-rw-r--r--src/metric/kd.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/metric/kd.rs b/src/metric/kd.rs
index 2caf4a3..6ea3809 100644
--- a/src/metric/kd.rs
+++ b/src/metric/kd.rs
@@ -1,8 +1,6 @@
//! [k-d trees](https://en.wikipedia.org/wiki/K-d_tree).
-use super::{Metric, NearestNeighbors, Neighborhood};
-
-use ordered_float::OrderedFloat;
+use super::{Metric, NearestNeighbors, Neighborhood, Ordered};
use std::iter::FromIterator;
@@ -82,7 +80,7 @@ impl<T: Cartesian> KdNode<T> {
return;
}
- slice.sort_unstable_by_key(|n| OrderedFloat::from(n.item.coordinate(i)));
+ slice.sort_unstable_by_key(|n| Ordered(n.item.coordinate(i)));
let mid = slice.len() / 2;
slice.swap(0, mid);