diff --git a/clippy_lints/src/methods/mod.rs b/clippy_lints/src/methods/mod.rs index 7f4964da72e..98d9426bd8a 100644 --- a/clippy_lints/src/methods/mod.rs +++ b/clippy_lints/src/methods/mod.rs @@ -339,13 +339,16 @@ /// **Known problems:** None. /// /// **Example:** - /// ```rust - /// # Bad - /// let r: Result = Ok(1); - /// assert_eq!(Some(1), r.map_or(None, Some)); /// - /// # Good - /// let r: Result = Ok(1); + /// Bad: + /// ```rust + /// # let r: Result = Ok(1); + /// assert_eq!(Some(1), r.map_or(None, Some)); + /// ``` + /// + /// Good: + /// ```rust + /// # let r: Result = Ok(1); /// assert_eq!(Some(1), r.ok()); /// ``` pub RESULT_MAP_OR_INTO_OPTION,