We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af0a40c commit d91fc14Copy full SHA for d91fc14
clippy_lints/src/methods/mod.rs
@@ -3785,11 +3785,15 @@ declare_clippy_lint! {
3785
///
3786
/// ### Example
3787
/// ```no_run
3788
+ /// # let option = Some(1);
3789
+ /// # let result: Result<usize, ()> = Ok(1);
3790
/// option.map(|a| a > 10).unwrap_or_default();
3791
/// result.map(|a| a > 10).unwrap_or_default();
3792
/// ```
3793
/// Use instead:
3794
3795
3796
3797
/// option.is_some_and(|a| a > 10);
3798
/// result.is_ok_and(|a| a > 10);
3799
0 commit comments