Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
malor committed Jun 18, 2024
1 parent bdd4c69 commit 546185f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ impl Histogram {
assert!(!value.is_nan(), "value must not be NaN");

let total_count = self.count();
if total_count == 0 || value < self.min().unwrap_or(std::f64::NAN) {
if total_count == 0 || value < self.min().unwrap_or(f64::NAN) {
// histogram is empty, or the interval (-inf; value] does not intersect
// with the interval [min; max]
0
} else if value >= self.max().unwrap_or(std::f64::NAN) {
} else if value >= self.max().unwrap_or(f64::NAN) {
// the interval (-inf; value] includes all the values in the histogram
total_count
} else {
Expand Down

0 comments on commit 546185f

Please sign in to comment.