Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ license = "MIT"

[dependencies]
ordered-float = "1.0"
superslice = "1"

[dev-dependencies]
criterion = "0.3.0"
Expand Down
4 changes: 2 additions & 2 deletions src/histogram.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::borrow::Borrow;

use ordered_float::OrderedFloat;
use superslice::*;

use crate::bin::Bin;

Expand Down Expand Up @@ -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());
}
Expand Down
Loading