Edit README.md
- Add instructions for using cargo run with multiple binaries - Mention cargo-fmt binary
This commit is contained in:
parent
623277e7e0
commit
169bff0e52
@ -28,7 +28,8 @@ You can run Rustfmt by just typing `rustfmt filename` if you used `Cargo
|
||||
install`. This runs rustfmt on the given file, if the file includes out of line
|
||||
modules, then we reformat those too. So to run on a whole module or crate, you
|
||||
just need to run on the root file (usually mod.rs or lib.rs). Rustfmt can also
|
||||
read data from stdin.
|
||||
read data from stdin. Alternatively, you can use `cargo fmt` to format all Rust
|
||||
files in the `src` directory of your crate.
|
||||
|
||||
You'll probably want to specify the write mode. Currently, there are modes for
|
||||
replace, overwrite, display, and coverage. The replace mode is the default
|
||||
@ -59,8 +60,9 @@ First make sure you've got Rust **1.4.0** or greater available, then:
|
||||
|
||||
`cargo test` to run all tests.
|
||||
|
||||
To run rustfmt after this, use `cargo run -- filename`. See the notes above on
|
||||
running rustfmt.
|
||||
To run rustfmt after this, use `cargo run --bin rustfmt -- filename`. See the
|
||||
notes above on running rustfmt. To run cargo-fmt, use
|
||||
`cargo run --bin cargo-fmt`
|
||||
|
||||
|
||||
## What style does Rustfmt use?
|
||||
|
Loading…
x
Reference in New Issue
Block a user