Skip to content

Commit d839b45

Browse files
committed
test: fix doc tests
1 parent dbd6681 commit d839b45

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

+4
Original file line numberDiff line numberDiff line change
@@ -3736,11 +3736,15 @@ declare_clippy_lint! {
37363736
///
37373737
/// ### Example
37383738
/// ```no_run
3739+
/// # let option = Some(1);
3740+
/// # let result: Result<usize, ()> = Ok(1);
37393741
/// option.map(|a| a > 10).unwrap_or_default();
37403742
/// result.map(|a| a > 10).unwrap_or_default();
37413743
/// ```
37423744
/// Use instead:
37433745
/// ```no_run
3746+
/// # let option = Some(1);
3747+
/// # let result: Result<usize, ()> = Ok(1);
37443748
/// option.is_some_and(|a| a > 10);
37453749
/// result.is_ok_and(|a| a > 10);
37463750
/// ```

0 commit comments

Comments
 (0)