diff options
| author | bors <bors@rust-lang.org> | 2022-07-17 13:33:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-07-17 13:33:40 +0000 |
| commit | 3a4e4575ede9eedbb3ce84851c7b3df1e6e3812a (patch) | |
| tree | 2b36736d18d1602d33b1d1b8f51cfe261b506e3d | |
| parent | 4562dd0a8e45af4fc2a49951df07ce5d3f1108ec (diff) | |
| parent | e7804355de8bfc93b3604beec7a7c32665a305ee (diff) | |
| download | rust-3a4e4575ede9eedbb3ce84851c7b3df1e6e3812a.tar.gz rust-3a4e4575ede9eedbb3ce84851c7b3df1e6e3812a.zip | |
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`
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 29ec6e04286..6981b4a6631 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -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 |
