]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/needless_pass_by_value.rs
Rollup merge of #96336 - Nilstrieb:link-to-correct-as_mut-in-ptr-as_ref, r=JohnTitor
[rust.git] / src / tools / clippy / clippy_lints / src / needless_pass_by_value.rs
index d29d07da7b0ffdcc8aa85a28443b6d8f1623357f..4034079a90c0d097cbece091e56c388c3068c229 100644 (file)
@@ -85,7 +85,7 @@ fn check_fn(
         }
 
         match kind {
-            FnKind::ItemFn(.., header, _) => {
+            FnKind::ItemFn(.., header) => {
                 let attrs = cx.tcx.hir().attrs(hir_id);
                 if header.abi != Abi::Rust || requires_exact_signature(attrs) {
                     return;
@@ -241,7 +241,7 @@ fn check_fn(
                                                 |x| Cow::from(format!("change `{}` to", x)),
                                             )
                                             .as_ref(),
-                                        suggestion.into(),
+                                        suggestion,
                                         Applicability::Unspecified,
                                     );
                                 }
@@ -271,7 +271,7 @@ fn check_fn(
                                                 |x| Cow::from(format!("change `{}` to", x))
                                             )
                                             .as_ref(),
-                                        suggestion.into(),
+                                        suggestion,
                                         Applicability::Unspecified,
                                     );
                                 }