Skip to content

Commit

Permalink
clippy does not like overlapping ranges
Browse files Browse the repository at this point in the history
I agree with the concept, so I've added the lower bounds.
Personally, I still think these match statements are easier to read than
the equivalent `else if` expression. So they're staying as range
comparisons.
  • Loading branch information
michaeldjeffrey committed Jun 6, 2024
1 parent d643b76 commit 5f04176
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions coverage_point_calculator/src/speedtest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ impl SpeedtestTier {

fn from_latency(millis: Millis) -> Self {
match millis {
..=49 => Self::Good,
..=59 => Self::Acceptable,
..=74 => Self::Degraded,
..=99 => Self::Poor,
00..=49 => Self::Good,
50..=59 => Self::Acceptable,
60..=74 => Self::Degraded,
75..=99 => Self::Poor,
_ => Self::Fail,
}
}
Expand Down

0 comments on commit 5f04176

Please sign in to comment.