diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 9bb7bb7a7..4bdb5785c 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -2225,8 +2225,12 @@ declare_clippy_lint! { } declare_clippy_lint! { + /// ### What it does + /// Checks for calling `take` function after `as_ref`. /// /// ### Why is this bad? + /// Redundant code. `take` writes `None` to its argument. + /// In this case the modification is useless as it's a temporary that cannot be read from afterwards. /// /// ### Example /// ```rust