Prefer instant.elapsed()
over Instant::now() - instant
#8603
Labels
instant.elapsed()
over Instant::now() - instant
#8603
Uh oh!
There was an error while loading. Please reload this page.
What it does
Suggests using the helper shortcut method, which is shorter.
https://doc.rust-lang.org/stable/std/time/struct.Instant.html#method.elapsed
Lint Name
No response
Category
No response
Advantage
No response
Drawbacks
No response
Example
Could be written as:
The text was updated successfully, but these errors were encountered: