Manual Duration::{as_nanos,as_milis,as_secs_f64,as_secs_f32} implementation #6068
Labels
C-enhancement
Category: Enhancement of lints, like adding more cases or adding help messages
good-first-issue
These issues are a good way to get started with Clippy
What it does
Recognize cases of manual re-implementation of the builtin
as_nanos
andas_secs_f64
andas_secs_f32
functions onDuration
.Categories
Drawbacks
MSRV issues, implementing the suggestion might increase the MSRV.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: