]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/methods/clone_on_ref_ptr.rs
Rollup merge of #105623 - compiler-errors:generator-type-size-fix, r=Nilstrieb
[rust.git] / src / tools / clippy / clippy_lints / src / methods / clone_on_ref_ptr.rs
index f82ca8912006180b5b853dd57f8af0538c423976..355f53532e2689beeda54d174fcaa50d82aab670 100644 (file)
@@ -41,7 +41,7 @@ pub(super) fn check(
             expr.span,
             "using `.clone()` on a ref-counted pointer",
             "try this",
-            format!("{}::<{}>::clone(&{})", caller_type, subst.type_at(0), snippet),
+            format!("{caller_type}::<{}>::clone(&{snippet})", subst.type_at(0)),
             Applicability::Unspecified, // Sometimes unnecessary ::<_> after Rc/Arc/Weak
         );
     }