mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
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:
parent
b776fb8294
commit
e7804355de
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue