Rustfmt sometimes puts 2 args in one line, but the rest on separate lines
Open
@topecongiro is already working on this.
Since Jul 1, 2020.
I-poor-formatting
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
rustfmt 1.4.18-nightly (c1e9b7b8 2020-06-13)
When I run rustfmt on this, it stays like this:
self.renderer.render(
texture,
identity, // model
identity, // perspective
identity, // view
None, // alpha
false, // depth_test
&mut target,
);
But when I remove &mut before target:
self.renderer.render(
texture,
identity, // model
identity, // perspective
identity, // view
None, // alpha
false, // depth_test
target,
);
rustfmt formats it like this:
self.renderer.render(
texture, identity, // model
identity, // perspective
identity, // view
None, // alpha
false, // depth_test
target,
);
Note: texture, identity, // model in one line.
:(
Expected output
self.renderer.render(
texture,
identity, // model
identity, // perspective
identity, // view
None, // alpha
false, // depth_test
target,
);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.