diff options
| author | Philipp Krones <hello@philkrones.com> | 2022-10-06 09:19:29 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-10-06 09:19:29 +0200 |
| commit | e2808afd60ea0f0e17c3aced354adfd58a1f825f (patch) | |
| tree | 3d9bcb2d75f4de029f4720c7c5462cd7e09fcf0d /clippy_lints/src/explicit_write.rs | |
| parent | da16cc1da9814710e637ff242b71768a4d3724b7 (diff) | |
| parent | 887ba0c5a489e28b55ff84244e1dc153861d16ad (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/explicit_write.rs')
| -rw-r--r-- | clippy_lints/src/explicit_write.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clippy_lints/src/explicit_write.rs b/clippy_lints/src/explicit_write.rs index b9ed4af0219..c0ea6f338a2 100644 --- a/clippy_lints/src/explicit_write.rs +++ b/clippy_lints/src/explicit_write.rs @@ -80,12 +80,12 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitWrite { // 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 @@ impl<'tcx> LateLintPass<'tcx> for ExplicitWrite { 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, ) } |
