Skip to content

Commit

Permalink
Auto merge of rust-lang#6146 - woshilapin:patch-1, r=flip1995
Browse files Browse the repository at this point in the history
clippy_lint: Fix doc on 'option_if_let_else'

changelog: none
  • Loading branch information
bors committed Oct 9, 2020
2 parents 2f6439a + 732d370 commit cad10fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/option_if_let_else.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ use rustc_session::{declare_lint_pass, declare_tool_lint};

declare_clippy_lint! {
/// **What it does:**
/// Lints usage of `if let Some(v) = ... { y } else { x }` which is more
/// Lints usage of `if let Some(v) = ... { y } else { x }` which is more
/// idiomatically done with `Option::map_or` (if the else bit is a pure
/// expression) or `Option::map_or_else` (if the else bit is an impure
/// expresion).
/// expression).
///
/// **Why is this bad?**
/// Using the dedicated functions of the Option type is clearer and
/// more concise than an if let expression.
/// more concise than an `if let` expression.
///
/// **Known problems:**
/// This lint uses a deliberately conservative metric for checking
Expand Down

0 comments on commit cad10fa

Please sign in to comment.