diff --git a/clippy_lints/src/duration_to_float_precision_loss.rs b/clippy_lints/src/duration_to_float_precision_loss.rs index e2599ab43da2..3e496f63259d 100644 --- a/clippy_lints/src/duration_to_float_precision_loss.rs +++ b/clippy_lints/src/duration_to_float_precision_loss.rs @@ -16,7 +16,7 @@ declare_clippy_lint! { /// precision is lost. /// /// ### Why is this bad? - /// This can be bad if the user wanted to retain the full precision of the duration. + /// Retaining the full precision of a duration is usually desired. /// /// ### Example /// ```no_run @@ -48,18 +48,18 @@ declare_clippy_lint! { /// # let duration = Duration::from_nanos(1234500000); /// let _ = duration.as_secs_f64(); /// ``` - #[clippy::version = "1.78.0"] + #[clippy::version = "1.79.0"] pub DURATION_TO_FLOAT_PRECISION_LOSS, - nursery, + style, "conversion from duration to float that cause loss of precision" } /// This struct implements the logic needed to apply the lint #[derive(Debug)] pub struct DurationToFloatPrecisionLoss { - // This vector is used to prevent applying the lint to a sub-expression + /// This vector is used to prevent applying the lint to a sub-expression lint_applications: Vec, - // `as_secs_f64` isn't applicable until 1.38.0 + /// `as_secs_f64` isn't applicable until 1.38.0 msrv: Msrv, }