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
This commit is contained in:
alexey semenyuk 2022-06-19 14:15:14 +00:00 committed by alex-semenyuk
parent b776fb8294
commit e7804355de

View file

@ -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