]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/methods/stable_sort_primitive.rs
Rollup merge of #104504 - compiler-errors:fru-syntax-note, r=estebank
[rust.git] / src / tools / clippy / clippy_lints / src / methods / stable_sort_primitive.rs
index 91951c65bb3095aebbeefb7fb105b35f53c05047..09c8ca4cbe44ccfd7358540ee07a50a7cd602998 100644 (file)
@@ -17,11 +17,11 @@ pub(super) fn check<'tcx>(cx: &LateContext<'tcx>, e: &'tcx Expr<'_>, recv: &'tcx
             cx,
             STABLE_SORT_PRIMITIVE,
             e.span,
-            &format!("used `sort` on primitive type `{}`", slice_type),
+            &format!("used `sort` on primitive type `{slice_type}`"),
             |diag| {
                 let mut app = Applicability::MachineApplicable;
                 let recv_snip = snippet_with_context(cx, recv.span, e.span.ctxt(), "..", &mut app).0;
-                diag.span_suggestion(e.span, "try", format!("{}.sort_unstable()", recv_snip), app);
+                diag.span_suggestion(e.span, "try", format!("{recv_snip}.sort_unstable()"), app);
                 diag.note(
                     "an unstable sort typically performs faster without any observable difference for this data type",
                 );