File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -143,25 +143,20 @@ when a pull request contains unformatted code. Using `--write-mode=diff` instruc
143
143
rustfmt to exit with an error code if the input is not formatted correctly.
144
144
It will also print any found differences.
145
145
146
- (These instructions use the nightly version of Rustfmt. If you want to use the
147
- Syntex version replace ` install rustfmt-nightly ` with ` install rustfmt ` ).
148
-
149
146
A minimal Travis setup could look like this:
150
147
151
148
``` yaml
152
149
language : rust
153
- cache : cargo
154
150
before_script :
155
- - export PATH="$PATH:$HOME/.cargo/bin"
156
- - which rustfmt || cargo install rustfmt-nightly
151
+ - rustup toolchain install nightly
152
+ - rustup component add --toolchain nightly rustfmt-preview
153
+ - which rustfmt || cargo install --force rustfmt-nightly
157
154
script :
158
- - cargo fmt -- --write-mode=diff
155
+ - cargo +nightly fmt --all -- --write-mode=diff
159
156
- cargo build
160
157
- cargo test
161
158
` ` `
162
159
163
- Note that using ` cache: cargo` is optional but highly recommended to speed up the installation.
164
-
165
160
## How to build and test
166
161
167
162
` cargo build` to build.
You can’t perform that action at this time.
0 commit comments