]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/pass_by_ref_or_value.rs
:arrow_up: rust-analyzer
[rust.git] / src / tools / clippy / clippy_lints / src / pass_by_ref_or_value.rs
index 6b2eea48932250b6b9ebf79b633a9f6e5c21641b..45e98de10ace4985308194b806b8f3645fc01a8d 100644 (file)
@@ -209,7 +209,7 @@ fn check_poly_fn(&mut self, cx: &LateContext<'tcx>, def_id: LocalDefId, decl: &F
                             cx,
                             TRIVIALLY_COPY_PASS_BY_REF,
                             input.span,
-                            &format!("this argument ({} byte) is passed by reference, but would be more efficient if passed by value (limit: {} byte)", size, self.ref_min_size),
+                            &format!("this argument ({size} byte) is passed by reference, but would be more efficient if passed by value (limit: {} byte)", self.ref_min_size),
                             "consider passing by value instead",
                             value_type,
                             Applicability::Unspecified,
@@ -237,7 +237,7 @@ fn check_poly_fn(&mut self, cx: &LateContext<'tcx>, def_id: LocalDefId, decl: &F
                                 cx,
                                 LARGE_TYPES_PASSED_BY_VALUE,
                                 input.span,
-                                &format!("this argument ({} byte) is passed by value, but might be more efficient if passed by reference (limit: {} byte)", size, self.value_max_size),
+                                &format!("this argument ({size} byte) is passed by value, but might be more efficient if passed by reference (limit: {} byte)", self.value_max_size),
                                 "consider passing by reference instead",
                                 format!("&{}", snippet(cx, input.span, "_")),
                                 Applicability::MaybeIncorrect,