Skip to content

Commit

Permalink
Use ..= syntax instead of deprecated ...
Browse files Browse the repository at this point in the history
  • Loading branch information
imp committed Sep 15, 2020
1 parent f9a02af commit ca2061b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/humantime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl HumanTime {

fn tense(&self, accuracy: Accuracy) -> Tense {
match self.0.num_seconds() {
-10...10 if accuracy.is_rough() => Tense::Present,
-10..=10 if accuracy.is_rough() => Tense::Present,
seconds if seconds.is_negative() => Tense::Past,
seconds if seconds.is_positive() => Tense::Future,
_ => Tense::Present,
Expand All @@ -170,7 +170,7 @@ impl HumanTime {
n if n > 90 => Minutes(max(n / MINUTE, 2)),
n if n > 45 => Minutes(1),
n if n > 10 => Seconds(n),
0...10 => Now,
0..=10 => Now,
_ => Eternity,
};

Expand Down

0 comments on commit ca2061b

Please sign in to comment.