]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/transmute/transmute_float_to_int.rs
Merge commit 'ac0e10aa68325235069a842f47499852b2dee79e' into clippyup
[rust.git] / src / tools / clippy / clippy_lints / src / transmute / transmute_float_to_int.rs
index 1bde977cfa273ba963df6b84077158bb25e41fda..5ecba512b0fd64e9b0414f6dab5216031c37a989 100644 (file)
@@ -24,7 +24,7 @@ pub(super) fn check<'tcx>(
                 cx,
                 TRANSMUTE_FLOAT_TO_INT,
                 e.span,
-                &format!("transmute from a `{}` to a `{}`", from_ty, to_ty),
+                &format!("transmute from a `{from_ty}` to a `{to_ty}`"),
                 |diag| {
                     let mut sugg = sugg::Sugg::hir(cx, arg, "..");
 
@@ -38,7 +38,7 @@ pub(super) fn check<'tcx>(
                         if let ExprKind::Lit(lit) = &arg.kind;
                         if let ast::LitKind::Float(_, ast::LitFloatType::Unsuffixed) = lit.node;
                         then {
-                            let op = format!("{}{}", sugg, float_ty.name_str()).into();
+                            let op = format!("{sugg}{}", float_ty.name_str()).into();
                             match sugg {
                                 sugg::Sugg::MaybeParen(_) => sugg = sugg::Sugg::MaybeParen(op),
                                 _ => sugg = sugg::Sugg::NonParen(op)