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`
This commit is contained in:
bors 2022-07-17 13:33:40 +00:00
commit 3a4e4575ed

View File

@ -2222,8 +2222,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