Skip to content

Commit 3a4e457

Browse files
committed
Auto merge of #9022 - alex-semenyuk:needless_option_take_more_docs, r=Jarcho
`NEEDLESS_OPTION_TAKE` doc improvements changelog: More info on `NEEDLESS_OPTION_TAKE`
2 parents 4562dd0 + e780435 commit 3a4e457

File tree

1 file changed

+4
-0
lines changed
  • clippy_lints/src/methods

1 file changed

+4
-0
lines changed

clippy_lints/src/methods/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -2222,8 +2222,12 @@ declare_clippy_lint! {
22222222
}
22232223

22242224
declare_clippy_lint! {
2225+
/// ### What it does
2226+
/// Checks for calling `take` function after `as_ref`.
22252227
///
22262228
/// ### Why is this bad?
2229+
/// Redundant code. `take` writes `None` to its argument.
2230+
/// In this case the modification is useless as it's a temporary that cannot be read from afterwards.
22272231
///
22282232
/// ### Example
22292233
/// ```rust

0 commit comments

Comments
 (0)