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/strings.rs | |
| parent | da16cc1da9814710e637ff242b71768a4d3724b7 (diff) | |
| parent | 887ba0c5a489e28b55ff84244e1dc153861d16ad (diff) | |
Merge remote-tracking branch 'upstream/master' into rustup
Diffstat (limited to 'clippy_lints/src/strings.rs')
| -rw-r--r-- | clippy_lints/src/strings.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/strings.rs b/clippy_lints/src/strings.rs index 662d399ca53..d356c99c8fc 100644 --- a/clippy_lints/src/strings.rs +++ b/clippy_lints/src/strings.rs @@ -284,7 +284,7 @@ impl<'tcx> LateLintPass<'tcx> for StringLitAsBytes { e.span, "calling a slice of `as_bytes()` with `from_utf8` should be not necessary", "try", - format!("Some(&{}[{}])", snippet_app, snippet(cx, right.span, "..")), + format!("Some(&{snippet_app}[{}])", snippet(cx, right.span, "..")), applicability ) } @@ -500,8 +500,8 @@ impl<'tcx> LateLintPass<'tcx> for TrimSplitWhitespace { cx, TRIM_SPLIT_WHITESPACE, trim_span.with_hi(split_ws_span.lo()), - &format!("found call to `str::{}` before `str::split_whitespace`", trim_fn_name), - &format!("remove `{}()`", trim_fn_name), + &format!("found call to `str::{trim_fn_name}` before `str::split_whitespace`"), + &format!("remove `{trim_fn_name}()`"), String::new(), Applicability::MachineApplicable, ); |
