Add indent call after when's if

This commit is contained in:
Joshua Warner 2024-12-17 07:25:10 -08:00
parent ad1e3369c5
commit 769baa9f63
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 50 additions and 0 deletions

View file

@ -1616,6 +1616,7 @@ fn fmt_when<'a>(
}
if let Some(guard_expr) = &branch.guard {
buf.indent(indent + INDENT);
buf.push_str(" if");
buf.spaces(1);
guard_expr.format_with_options(buf, Parens::NotNeeded, Newlines::Yes, indent + INDENT);