Skip to content

Commit b7a2405

Browse files
committed
Resolve duration_suboptimal_units pedantic clippy lint
warning: constructing a `Duration` using a smaller unit when a larger unit would be more readable --> tests/repo/progress.rs:14:36 | 14 | tick: Instant::now() + Duration::from_millis(2000), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duration_suboptimal_units = note: `-W clippy::duration-suboptimal-units` implied by `-W clippy::pedantic` = help: to override `-W clippy::pedantic` add `#[allow(clippy::duration_suboptimal_units)]` help: try using from_secs | 14 - tick: Instant::now() + Duration::from_millis(2000), 14 + tick: Instant::now() + Duration::from_secs(2), |
1 parent 2efa9ff commit b7a2405

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/repo/progress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ impl<R> Progress<R> {
1111
pub fn new(stream: R) -> Self {
1212
Progress {
1313
bytes: 0,
14-
tick: Instant::now() + Duration::from_millis(2000),
14+
tick: Instant::now() + Duration::from_secs(2),
1515
stream,
1616
}
1717
}

0 commit comments

Comments
 (0)