Comment

Comment by zamalek

> I eventually gave up on trying to make the formatted rust-fuse code look pretty, and settled for "consistent".

Even though it's a bit ugly, this is a big win.

As for why it does this, from my experience, rust-fmt will try to keep lines under a column limit but not greedily. e.g. if a params list would extend past the limit, then all params get a newline. It seems to try to balance horizontal estate and vertical estate and I've become used to that (even though it is inconsistent at times).

Any formatting rule is going to fall over eventually. Rust-fmt seems to make sane choices the majority of the time.

parent zamalek 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton