]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/get_first.rs
Auto merge of #9148 - arieluy:then_some_unwrap_or, r=Jarcho
[rust.git] / clippy_lints / src / get_first.rs
index 0748ab45252ad3d8decd4ad9b8e80a99afc0f29c..529f7babaa5eab516e5f2a7744f4d31cef4afd4a 100644 (file)
     ///
     /// ### Example
     /// ```rust
-    /// // Bad
     /// let x = vec![2, 3, 5];
     /// let first_element = x.get(0);
     /// ```
+    ///
     /// Use instead:
     /// ```rust
-    /// // Good
     /// let x = vec![2, 3, 5];
     /// let first_element = x.first();
     /// ```