]> 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 ab05a0b423853f245ca00b5d2f940383da0d8ef9..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 == '(' {