style: inline variables in format!

This commit is contained in:
Nadir Fejzic 2022-11-07 22:21:32 +01:00
parent 4bd6d0beb0
commit 852d802451

View File

@ -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,
);
}