]> git.lizzy.rs Git - rust.git/blobdiff - src/tools/clippy/clippy_lints/src/explicit_write.rs
Rollup merge of #105123 - BlackHoleFox:fixing-the-macos-deployment, r=oli-obk
[rust.git] / src / tools / clippy / clippy_lints / src / explicit_write.rs
index b9ed4af02190b07c4eb7c5a409ab890be52e907b..c0ea6f338a230b51d9864dc2dcc8e89a56558ed3 100644 (file)
@@ -80,12 +80,12 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                 // used.
                 let (used, sugg_mac) = if let Some(macro_name) = calling_macro {
                     (
-                        format!("{}!({}(), ...)", macro_name, dest_name),
+                        format!("{macro_name}!({dest_name}(), ...)"),
                         macro_name.replace("write", "print"),
                     )
                 } else {
                     (
-                        format!("{}().write_fmt(...)", dest_name),
+                        format!("{dest_name}().write_fmt(...)"),
                         "print".into(),
                     )
                 };
@@ -100,9 +100,9 @@ fn check_expr(&mut self, cx: &LateContext<'tcx>, expr: &'tcx Expr<'_>) {
                     cx,
                     EXPLICIT_WRITE,
                     expr.span,
-                    &format!("use of `{}.unwrap()`", used),
+                    &format!("use of `{used}.unwrap()`"),
                     "try this",
-                    format!("{}{}!({})", prefix, sugg_mac, inputs_snippet),
+                    format!("{prefix}{sugg_mac}!({inputs_snippet})"),
                     applicability,
                 )
             }