mirror of
https://github.com/rust-lang/rust.git
synced 2026-06-02 06:28:20 +03: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:
committed by
alex-semenyuk
parent
b776fb8294
commit
e7804355de
@@ -2225,8 +2225,12 @@
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user