Hi, guys. How i can start use rustfmt? Thanks
Your question is too generic. I have 3 questions for you:
- Have you gone through the documentation?
- Is there any specific thing you are having an issue with on how to use rustfmt as explained in the doc?
- Have you tried doing it and got stuck somewhere?
Sorry, I thought that this documentation (repository) is not official. It would be nice if it was shipped with Rust and was run by a simple rustfmt command for example.
As of the next release, it will be on the stable channel. Until then, you can install it on the nightly channel as described here: https://github.com/rust-lang-nursery/rustfmt#quick-start
One command is one more than “included by default”, but we’re just not ready yet.
cargo fmt is only one character longer, thanks to the space
It is rather complex.
At now you should use
beta variant of compiler:
rustup default beta
then make sure that rustfmt installed:
rustup component add --toolchain beta rustfmt-preview
cargo fmt should works.