Merge pull request #7520 from gamebox/format-new-lambdas

Format all lambdas to new syntax
This commit is contained in:
Anthony Bullard 2025-01-16 16:55:10 -06:00 committed by GitHub
commit d3c400b5e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
70 changed files with 1105 additions and 669 deletions

View file

@ -2015,7 +2015,7 @@ fn fmt_closure<'a>(
use self::Expr::*;
buf.indent(indent);
buf.push('\\');
buf.push('|');
let arguments_are_multiline = loc_patterns
.iter()
@ -2063,12 +2063,10 @@ fn fmt_closure<'a>(
if arguments_are_multiline {
buf.ensure_ends_with_newline();
buf.indent(indent);
} else {
buf.spaces(1);
}
let arrow_line_indent = buf.cur_line_indent();
buf.push_str("->");
buf.push_str("|");
buf.spaces(1);
let is_multiline = loc_ret.value.is_multiline();