Skip to content

Commit e780435

Browse files
committed
NEEDLESS_OPTION_TAKE doc improvements
NEEDLESS_OPTION_TAKE doc improvements NEEDLESS_OPTION_TAKE doc improvements NEEDLESS_OPTION_TAKE doc improvements NEEDLESS_OPTION_TAKE doc improvements NEEDLESS_OPTION_TAKE doc improvements NEEDLESS_OPTION_TAKE doc improvements NEEDLESS_OPTION_TAKE doc improvements
1 parent b776fb8 commit e780435

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2225,8 +2225,12 @@ declare_clippy_lint! {
22252225
}
22262226

22272227
declare_clippy_lint! {
2228+
/// ### What it does
2229+
/// Checks for calling `take` function after `as_ref`.
22282230
///
22292231
/// ### Why is this bad?
2232+
/// Redundant code. `take` writes `None` to its argument.
2233+
/// In this case the modification is useless as it's a temporary that cannot be read from afterwards.
22302234
///
22312235
/// ### Example
22322236
/// ```rust

0 commit comments

Comments
 (0)