Skip to content

Commit

Permalink
Document RUSTFMT environment variable (#4464)
Browse files Browse the repository at this point in the history
* Document RUSTFMT env var

* Move documentation up

* Apply suggestions from code review

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>

* Fix accedental removal

Co-authored-by: Caleb Cartwright <calebcartwright@users.noreply.github.com>
  • Loading branch information
MonliH and calebcartwright authored Oct 11, 2020
1 parent 296c4ad commit f352f38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ The easiest way to run rustfmt against a project is with `cargo fmt`. `cargo fmt
single-crate projects and [cargo workspaces](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html).
Please see `cargo fmt --help` for usage information.

You can specify the path to your own `rustfmt` binary for cargo to use by setting the`RUSTFMT`
environment variable. This was added in v1.4.22, so you must have this version or newer to leverage this feature (`cargo fmt --version`)

### Running `rustfmt` directly

To format individual files or arbitrary codes from stdin, the `rustfmt` binary should be used. Some
Expand Down

0 comments on commit f352f38

Please sign in to comment.