Skip to content

Commit

Permalink
Merge pull request #3 from malor/fix-warnings
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
malor authored Jun 18, 2024
2 parents bdd4c69 + 546185f commit 7cff7da
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 7cff7da

Please sign in to comment.