]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/casts/fn_to_numeric_cast.rs
Auto merge of #9870 - koka831:unformat-unused-rounding, r=Jarcho
[rust.git] / clippy_lints / src / casts / fn_to_numeric_cast.rs
index 35350d8a25b86ce9cefff7c6ce83e6a6b4ee9fe9..a26bfab4e7c1568d22b62eae3780169dd0bf79e5 100644 (file)
@@ -25,9 +25,9 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>,
                     cx,
                     FN_TO_NUMERIC_CAST,
                     expr.span,
-                    &format!("casting function pointer `{}` to `{}`", from_snippet, cast_to),
+                    &format!("casting function pointer `{from_snippet}` to `{cast_to}`"),
                     "try",
-                    format!("{} as usize", from_snippet),
+                    format!("{from_snippet} as usize"),
                     applicability,
                 );
             }