Skip to content

Commit 57fe0ef

Browse files
declanvkblyxyas
andauthored
Apply suggestions from code review
I'm applying these from the UI, but will come back and do the remaining comments and squash it all together with the original commit Co-authored-by: Alejandra González <[email protected]>
1 parent 056ed4a commit 57fe0ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clippy_lints/src/duration_to_float_precision_loss.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ declare_clippy_lint! {
1616
/// precision is lost.
1717
///
1818
/// ### Why is this bad?
19-
/// This can be bad if the user wanted to retain the full precision of the duration.
19+
/// Retaining the full precision of a duration is usually desired.
2020
///
2121
/// ### Example
2222
/// ```no_run
@@ -48,18 +48,18 @@ declare_clippy_lint! {
4848
/// # let duration = Duration::from_nanos(1234500000);
4949
/// let _ = duration.as_secs_f64();
5050
/// ```
51-
#[clippy::version = "1.78.0"]
51+
#[clippy::version = "1.79.0"]
5252
pub DURATION_TO_FLOAT_PRECISION_LOSS,
53-
nursery,
53+
style,
5454
"conversion from duration to float that cause loss of precision"
5555
}
5656

5757
/// This struct implements the logic needed to apply the lint
5858
#[derive(Debug)]
5959
pub struct DurationToFloatPrecisionLoss {
60-
// This vector is used to prevent applying the lint to a sub-expression
60+
/// This vector is used to prevent applying the lint to a sub-expression
6161
lint_applications: Vec<Span>,
62-
// `as_secs_f64` isn't applicable until 1.38.0
62+
/// `as_secs_f64` isn't applicable until 1.38.0
6363
msrv: Msrv,
6464
}
6565

0 commit comments

Comments
 (0)