diff options
| author | Philipp Krones <hello@philkrones.com> | 2022-09-28 14:27:32 +0200 |
|---|---|---|
| committer | Philipp Krones <hello@philkrones.com> | 2022-09-28 14:27:32 +0200 |
| commit | bbcde666853d11f6f5f3bdc660f018cf7fc8cd71 (patch) | |
| tree | 28df6eeea41c8e772bb65a172962f74282db1de1 /clippy_lints/src/explicit_write.rs | |
| parent | e5ce6d18df883f593e72f7958bebdc3ebcdbe85e (diff) | |
| parent | 0f6932a1f7623663e50922225ea304340949c051 (diff) | |
| download | rust-bbcde666853d11f6f5f3bdc660f018cf7fc8cd71.tar.gz rust-bbcde666853d11f6f5f3bdc660f018cf7fc8cd71.zip | |
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, ) } |
