diff options
| author | Nick Torres <nickrtorres@icloud.com> | 2020-04-04 17:20:23 -0700 |
|---|---|---|
| committer | Nick Torres <nickrtorres@icloud.com> | 2020-04-04 17:20:23 -0700 |
| commit | 5d54fbb7914cc1ea5b3bd8cdfd6f24dbacd8f649 (patch) | |
| tree | 18ea2ae96a6dea3e0c02a409ba840826e1049b7c | |
| parent | 325d0b69d2dffccecf48c5d7975ccd100141e1f5 (diff) | |
| download | rust-5d54fbb7914cc1ea5b3bd8cdfd6f24dbacd8f649.tar.gz rust-5d54fbb7914cc1ea5b3bd8cdfd6f24dbacd8f649.zip | |
result_map_or_into_option: fix syntax error in example
| -rw-r--r-- | clippy_lints/src/methods/mod.rs | 11 |
1 files changed, 7 insertions, 4 deletions
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 @@ declare_clippy_lint! { /// **Known problems:** None. /// /// **Example:** + /// + /// Bad: /// ```rust - /// # Bad - /// let r: Result<u32, &str> = Ok(1); + /// # let r: Result<u32, &str> = Ok(1); /// assert_eq!(Some(1), r.map_or(None, Some)); + /// ``` /// - /// # Good - /// let r: Result<u32, &str> = Ok(1); + /// Good: + /// ```rust + /// # let r: Result<u32, &str> = Ok(1); /// assert_eq!(Some(1), r.ok()); /// ``` pub RESULT_MAP_OR_INTO_OPTION, |
