Since no one has objected, progress has been made and we've merged the
change this morning.
In addition to what Mitchell wrote, we've changed the `if` and `let ...
else` heuristics as follows:
single_line_if_else_max_width = 50
single_line_let_else_max_width = 50
Raphaël
On 2/19/25 9:04 PM, Mitchell Kember via Mercurial wrote:
Hi,
I'm proposing to change mercurial's Rust style in rustfmt.toml. I've
made a merge request to show what it would look like:
https://foss.heptapod.net/mercurial/mercurial-devel/-/merge_requests/1275
Specifically:
* Format imports to be consistent (one per line), and arrange them
in groups.
* Change the max line width from 79 to 80.
* Disable the "small heuristics" which causes wrapping much earlier
than max_width.
Since this affects all contributors, and formatting always brings out
strong opinions, I thought I'd start a discussion here. Let me know if
you are in favor or have any objections.
Mitchell
_______________________________________________
Mercurial mailing list
Mercurial@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial
_______________________________________________
Mercurial mailing list
Mercurial@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial