mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-15 01:17:16 +00:00
Use more concrete explanation for methods
Show some code rather than "a single method call".
This commit is contained in:
parent
c9fdeef643
commit
7021d70d2e
1 changed files with 10 additions and 10 deletions
|
@ -400,8 +400,8 @@ declare_clippy_lint! {
|
|||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for usage of `_.map(_).flatten(_)`,
|
||||
///
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as a
|
||||
/// single method call using `_.flat_map(_)`
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as
|
||||
/// `_.flat_map(_)`
|
||||
///
|
||||
/// **Known problems:**
|
||||
///
|
||||
|
@ -424,8 +424,8 @@ declare_clippy_lint! {
|
|||
/// **What it does:** Checks for usage of `_.filter(_).map(_)`,
|
||||
/// `_.filter(_).flat_map(_)`, `_.filter_map(_).flat_map(_)` and similar.
|
||||
///
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as a
|
||||
/// single method call.
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as
|
||||
/// `_.filter_map(_)`.
|
||||
///
|
||||
/// **Known problems:** Often requires a condition + Option/Iterator creation
|
||||
/// inside the closure.
|
||||
|
@ -452,8 +452,8 @@ declare_clippy_lint! {
|
|||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for usage of `_.filter_map(_).next()`.
|
||||
///
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as a
|
||||
/// single method call.
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as
|
||||
/// `_.find_map(_)`.
|
||||
///
|
||||
/// **Known problems:** None
|
||||
///
|
||||
|
@ -496,8 +496,8 @@ declare_clippy_lint! {
|
|||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for usage of `_.find(_).map(_)`.
|
||||
///
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as a
|
||||
/// single method call.
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as
|
||||
/// `_.find_map(_)`.
|
||||
///
|
||||
/// **Known problems:** Often requires a condition + Option/Iterator creation
|
||||
/// inside the closure.
|
||||
|
@ -1276,8 +1276,8 @@ declare_clippy_lint! {
|
|||
declare_clippy_lint! {
|
||||
/// **What it does:** Checks for usage of `_.as_ref().map(Deref::deref)` or it's aliases (such as String::as_str).
|
||||
///
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as a
|
||||
/// single method call.
|
||||
/// **Why is this bad?** Readability, this can be written more concisely as
|
||||
/// `_.as_deref()`.
|
||||
///
|
||||
/// **Known problems:** None.
|
||||
///
|
||||
|
|
Loading…
Reference in a new issue