Skip to content

Commit d91fc14

Browse files
committed
test: fix doc tests
1 parent af0a40c commit d91fc14

File tree

1 file changed

+4
-0
lines changed
  • clippy_lints/src/methods

1 file changed

+4
-0
lines changed

clippy_lints/src/methods/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,11 +3785,15 @@ declare_clippy_lint! {
37853785
///
37863786
/// ### Example
37873787
/// ```no_run
3788+
/// # let option = Some(1);
3789+
/// # let result: Result<usize, ()> = Ok(1);
37883790
/// option.map(|a| a > 10).unwrap_or_default();
37893791
/// result.map(|a| a > 10).unwrap_or_default();
37903792
/// ```
37913793
/// Use instead:
37923794
/// ```no_run
3795+
/// # let option = Some(1);
3796+
/// # let result: Result<usize, ()> = Ok(1);
37933797
/// option.is_some_and(|a| a > 10);
37943798
/// result.is_ok_and(|a| a > 10);
37953799
/// ```

0 commit comments

Comments
 (0)