]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/casts/fn_to_numeric_cast_with_truncation.rs
Rollup merge of #102323 - Stoozy:master, r=cjgillot
[rust.git] / src / tools / clippy / clippy_lints / src / casts / fn_to_numeric_cast_with_truncation.rs
index 6287f479b5bfec4db1b51a6c1cc6fbe6310e97a0..556be1d1506657a4f8d80bd6ce563f770c508155 100644 (file)
@@ -24,12 +24,9 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, cast_expr: &Expr<'_>,
                     cx,
                     FN_TO_NUMERIC_CAST_WITH_TRUNCATION,
                     expr.span,
-                    &format!(
-                        "casting function pointer `{}` to `{}`, which truncates the value",
-                        from_snippet, cast_to
-                    ),
+                    &format!("casting function pointer `{from_snippet}` to `{cast_to}`, which truncates the value"),
                     "try",
-                    format!("{} as usize", from_snippet),
+                    format!("{from_snippet} as usize"),
                     applicability,
                 );
             }