2022-08-11 12:42:16 -05:00
|
|
|
error: manual implementation of `Instant::elapsed`
|
2022-11-21 13:34:47 -06:00
|
|
|
--> $DIR/manual_instant_elapsed.rs:18:20
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | let duration = Instant::now() - prev_instant;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `prev_instant.elapsed()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::manual-instant-elapsed` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: manual implementation of `Instant::elapsed`
|
2022-11-21 13:34:47 -06:00
|
|
|
--> $DIR/manual_instant_elapsed.rs:27:5
|
2022-08-11 12:42:16 -05:00
|
|
|
|
|
|
|
|
LL | Instant::now() - *ref_to_instant; // to ensure parens are added correctly
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(*ref_to_instant).elapsed()`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|