2 ms·
Should've had a section about that! In short it prints more readable code in some cases, has better support in macros and supports a wider range of nightly fea
by jinxdash 4y ago
Should've had a section about that!
In short it prints more readable code in some cases, has better support in macros and supports a wider range of nightly features.
With that being said the main show here is still the Prettier Rust VSCode extension
Prettier Rust uses the jinx-rust parser, which is unstrict and entirely independent from the Rust compiler. Hence it's capable of formatting half-broken code that doesn't compile.
So while you may be using rustfmt as a postprocess, Prettier Rust is moreover capable of formatting programs as you write them.
I highly recommend at least trying it! The VSCode extension is a 1 click install/uninstall.