Skip to content

Commit

Permalink
Document a bit more
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Oct 19, 2024
1 parent 89a5a7e commit 2229d40
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
"reqwest",
"rfind",
"rustc",
"rustfmt",
"rustup",
"sboxed",
"schnorr",
Expand Down
19 changes: 19 additions & 0 deletions tooling/nargo_fmt/src/formatter/chunks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,25 @@ impl<'a> Formatter<'a> {
// everything that follows up to the left parentheses fits in the current line.
// If so, we write that and we'll end up formatting the arguments in multiple
// lines, instead of splitting this entire call chain in multiple lines.
//
// For example, a call like this:
//
// foo.bar.baz.qux(1)
//
// if it exceeds the maximum width, will end up being formatted like this:
//
// foo.bar.baz.qux(
// 1,
// )
//
// instead of like this (many more lines):
//
// foo
// .bar
// .baz
// .qux(1)
//
// This is something that rustfmt seems to do too.
if let GroupKind::MethodCall {
width_until_left_paren_inclusive,
has_newlines_before_left_paren: false,
Expand Down

0 comments on commit 2229d40

Please sign in to comment.