Skip to content

Commit

Permalink
result_map_or_into_option: fix syntax error in example
Browse files Browse the repository at this point in the history
  • Loading branch information
nickrtorres committed Apr 5, 2020
1 parent 325d0b6 commit 5d54fbb
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,16 @@ declare_clippy_lint! {
/// **Known problems:** None.
///
/// **Example:**
///
/// Bad:
/// ```rust
/// # Bad
/// let r: Result<u32, &str> = Ok(1);
/// # let r: Result<u32, &str> = Ok(1);
/// assert_eq!(Some(1), r.map_or(None, Some));
/// ```
///
/// # Good
/// let r: Result<u32, &str> = Ok(1);
/// Good:
/// ```rust
/// # let r: Result<u32, &str> = Ok(1);
/// assert_eq!(Some(1), r.ok());
/// ```
pub RESULT_MAP_OR_INTO_OPTION,
Expand Down

0 comments on commit 5d54fbb

Please sign in to comment.