Skip to content

Commit 60a3490

Browse files
committed
test: fix doc tests
1 parent a062bc5 commit 60a3490

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
@@ -3761,11 +3761,15 @@ declare_clippy_lint! {
37613761
///
37623762
/// ### Example
37633763
/// ```no_run
3764+
/// # let option = Some(1);
3765+
/// # let result: Result<usize, ()> = Ok(1);
37643766
/// option.map(|a| a > 10).unwrap_or_default();
37653767
/// result.map(|a| a > 10).unwrap_or_default();
37663768
/// ```
37673769
/// Use instead:
37683770
/// ```no_run
3771+
/// # let option = Some(1);
3772+
/// # let result: Result<usize, ()> = Ok(1);
37693773
/// option.is_some_and(|a| a > 10);
37703774
/// result.is_ok_and(|a| a > 10);
37713775
/// ```

0 commit comments

Comments
 (0)