diff --git a/Cargo.toml b/Cargo.toml index ea93f44..5a3f7b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,6 @@ license = "MIT" [dependencies] ordered-float = "1.0" -superslice = "1" [dev-dependencies] criterion = "0.3.0" diff --git a/src/histogram.rs b/src/histogram.rs index a261af9..195d225 100644 --- a/src/histogram.rs +++ b/src/histogram.rs @@ -1,7 +1,6 @@ use std::borrow::Borrow; use ordered_float::OrderedFloat; -use superslice::*; use crate::bin::Bin; @@ -287,7 +286,8 @@ impl Histogram { // the configured size, the histogram is shrunk by merging two closest bins to restore // the invariant let bin = value.into(); - self.bins.insert(self.bins.upper_bound(&bin), bin); + self.bins + .insert(self.bins.partition_point(|x| x <= &bin), bin); self.shrink(); self.track_min_max(bin.value()); }