bwasty / gltf-viewer

glTF 2.0 Viewer written in Rust
The Unlicense
188 stars 31 forks source link

`cargo fmt` #53

Closed anderejd closed 6 years ago

anderejd commented 6 years ago

What do you think?

It's the latest rustfmt-preview installed by rustup, default settings. One small customization, added the skip attribute on this function: https://github.com/bwasty/gltf-viewer/compare/master...anderejd:rustfmt?expand=1#diff-b3e4d6813a5439d77fbb647a27ac2998R90 to avoid uglification of the matrix literals.

bwasty commented 6 years ago

I'm not sure - I quite dislike most of the extra line breaks rustfmt inserts (+303 lines!). I tried more than once to configure the 'break points' without much success (though it's been a while).

anderejd commented 6 years ago

Feel free to close :) I just wanted to get your opinion on this before moving forward with new PRs. There are other things, that I am not comfortable with in the rustfmt defaults, but using them does remove formatting discussions completely from any future PR review.

bwasty commented 6 years ago

Ok - I also tried again to configure rustfmt, but even with the new nightly-only configuration options it didn't look much better. I think rustfmt is good idea, but it comes a bit late (...after I have gotten used to my own style for years).