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 325d0b6 commit 5d54fbbCopy full SHA for 5d54fbb
clippy_lints/src/methods/mod.rs
@@ -339,13 +339,16 @@ declare_clippy_lint! {
339
/// **Known problems:** None.
340
///
341
/// **Example:**
342
+ ///
343
+ /// Bad:
344
/// ```rust
- /// # Bad
- /// let r: Result<u32, &str> = Ok(1);
345
+ /// # let r: Result<u32, &str> = Ok(1);
346
/// assert_eq!(Some(1), r.map_or(None, Some));
347
+ /// ```
348
- /// # Good
349
+ /// Good:
350
+ /// ```rust
351
352
/// assert_eq!(Some(1), r.ok());
353
/// ```
354
pub RESULT_MAP_OR_INTO_OPTION,
0 commit comments