Skip to content

Commit

Permalink
test: fix doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxqiu committed Nov 25, 2023
1 parent a062bc5 commit 60a3490
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clippy_lints/src/methods/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3761,11 +3761,15 @@ declare_clippy_lint! {
///
/// ### Example
/// ```no_run
/// # let option = Some(1);
/// # let result: Result<usize, ()> = Ok(1);
/// option.map(|a| a > 10).unwrap_or_default();
/// result.map(|a| a > 10).unwrap_or_default();
/// ```
/// Use instead:
/// ```no_run
/// # let option = Some(1);
/// # let result: Result<usize, ()> = Ok(1);
/// option.is_some_and(|a| a > 10);
/// result.is_ok_and(|a| a > 10);
/// ```
Expand Down

0 comments on commit 60a3490

Please sign in to comment.