]> git.lizzy.rs Git - rust.git/blobdiff - clippy_utils/src/sugg.rs
Auto merge of #7776 - tsoutsman:patch-1, r=flip1995
[rust.git] / clippy_utils / src / sugg.rs
index 65d93e8f86e43f1c7953d83f45721bb9add27c43..5b0efb1fd7132811c449eb408729f4ea08f40870 100644 (file)
@@ -311,7 +311,7 @@ pub fn maybe_par(self) -> Self {
 /// Return `true` if `sugg` is enclosed in parenthesis.
 fn has_enclosing_paren(sugg: impl AsRef<str>) -> bool {
     let mut chars = sugg.as_ref().chars();
-    if let Some('(') = chars.next() {
+    if chars.next() == Some('(') {
         let mut depth = 1;
         for c in &mut chars {
             if c == '(' {
@@ -329,7 +329,7 @@ fn has_enclosing_paren(sugg: impl AsRef<str>) -> bool {
     }
 }
 
-// Copied from the rust standart library, and then edited
+/// Copied from the rust standard library, and then edited
 macro_rules! forward_binop_impls_to_ref {
     (impl $imp:ident, $method:ident for $t:ty, type Output = $o:ty) => {
         impl $imp<$t> for &$t {