diff --git a/clippy_lints/src/instant_subtraction.rs b/clippy_lints/src/instant_subtraction.rs index 3166c62dad4..c039f1b5c6a 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, ); }