]> git.lizzy.rs Git - rust.git/blobdiff - clippy_utils/src/lib.rs
Auto merge of #7256 - xFrednet:7172-trick-cargos-caching-for-collection, r=flip1995
[rust.git] / clippy_utils / src / lib.rs
index 39fd324408a7f6c88e2acedc785bf822eba0e8bd..769836aaf18ed6c54c3773c5c4e052e8528f96c5 100644 (file)
@@ -667,7 +667,7 @@ pub fn method_chain_args<'a>(expr: &'a Expr<'_>, methods: &[&str]) -> Option<Vec
                     return None;
                 }
                 matched.push(args); // build up `matched` backwards
-                current = &args[0] // go to parent expression
+                current = &args[0]; // go to parent expression
             } else {
                 return None;
             }
@@ -1094,9 +1094,9 @@ fn are_refutable<'a, I: Iterator<Item = &'a Pat<'a>>>(cx: &LateContext<'_>, mut
 /// the function once on the given pattern.
 pub fn recurse_or_patterns<'tcx, F: FnMut(&'tcx Pat<'tcx>)>(pat: &'tcx Pat<'tcx>, mut f: F) {
     if let PatKind::Or(pats) = pat.kind {
-        pats.iter().copied().for_each(f)
+        pats.iter().copied().for_each(f);
     } else {
-        f(pat)
+        f(pat);
     }
 }