rune
rune copied to clipboard
Silly auto-formatting for chained method calls / builder pattern
When you have chained method calls / builder pattern the Rune auto-formatter wants to put it all on one line. It would be better if it formatted this like rustfmt split over several:
systemd::Systemd::from_pkg("btrfs-progs", "[email protected]", package_managers.get("pacman").unwrap()).name("[email protected]").enable(cmds)?;
I would prefer something like:
systemd::Systemd::from_pkg("btrfs-progs",
"[email protected]",
package_managers.get("pacman").unwrap())
.name("[email protected]")
.enable(cmds)?;
You can also get this to happen with a long vector passed as an argument to a function. It seems that rune only inserts line breaks between statements, never breaking overly long lines.