From 852d80245148cdd23c5516bea015b0f3bf277ed4 Mon Sep 17 00:00:00 2001 From: Nadir Fejzic Date: Mon, 7 Nov 2022 22:21:32 +0100 Subject: [PATCH] style: inline variables in `format!` --- clippy_lints/src/instant_subtraction.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/instant_subtraction.rs b/clippy_lints/src/instant_subtraction.rs index 3166c62da..c039f1b5c 100644 --- a/clippy_lints/src/instant_subtraction.rs +++ b/clippy_lints/src/instant_subtraction.rs @@ -174,7 +174,7 @@ fn print_unchecked_duration_subtraction_sugg( expr.span, "unchecked subtraction of a 'Duration' from an 'Instant'", "try", - format!("{}.checked_sub({}).unwrap();", left_expr, right_expr), + format!("{left_expr}.checked_sub({right_expr}).unwrap();"), applicability, ); }