Skip to content

Commit d032106

Browse files
committed
refactor
1 parent f5143c9 commit d032106

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/unit/duration.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{fmt, time::Duration as StdDuration};
1+
use std::{fmt, time};
22

33
use humantime::format_duration;
44

@@ -10,13 +10,13 @@ pub struct Duration;
1010

1111
impl DisplayValue for Duration {
1212
fn display_current_value(&self, w: &mut dyn fmt::Write, value: Step, _upper: Option<Step>) -> fmt::Result {
13-
w.write_str(&format_duration(StdDuration::new(value as u64, 0)).to_string())
13+
w.write_str(&format_duration(time::Duration::new(value as u64, 0)).to_string())
1414
}
1515
fn separator(&self, w: &mut dyn fmt::Write, _value: Step, _upper: Option<Step>) -> fmt::Result {
1616
w.write_str(" of ")
1717
}
1818
fn display_upper_bound(&self, w: &mut dyn fmt::Write, upper_bound: Step, _value: Step) -> fmt::Result {
19-
w.write_str(&format_duration(StdDuration::new(upper_bound as u64, 0)).to_string())
19+
w.write_str(&format_duration(time::Duration::new(upper_bound as u64, 0)).to_string())
2020
}
2121

2222
fn dyn_hash(&self, state: &mut dyn std::hash::Hasher) {

0 commit comments

Comments
 (0)