We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unchecked_duration_subtraction
1 parent e1dbafd commit ff2919aCopy full SHA for ff2919a
clippy_lints/src/instant_subtraction.rs
@@ -40,7 +40,7 @@ declare_clippy_lint! {
40
41
declare_clippy_lint! {
42
/// ### What it does
43
- /// Lints subtraction between an [`Instant`] and a [`Duration`].
+ /// Lints subtraction between an `Instant` and a `Duration`.
44
///
45
/// ### Why is this bad?
46
/// Unchecked subtraction could cause underflow on certain platforms, leading to
@@ -57,9 +57,6 @@ declare_clippy_lint! {
57
/// # use std::time::{Instant, Duration};
58
/// let time_passed = Instant::now().checked_sub(Duration::from_secs(5));
59
/// ```
60
- ///
61
- /// [`Duration`]: std::time::Duration
62
- /// [`Instant::now()`]: std::time::Instant::now;
63
#[clippy::version = "1.67.0"]
64
pub UNCHECKED_DURATION_SUBTRACTION,
65
pedantic,
0 commit comments