Merge pull request #1341 from daboross/patch-1

Update example in travis section of README
This commit is contained in:
Nick Cameron 2017-02-27 09:41:50 +13:00 committed by GitHub
commit 30ecc5d785

View File

@ -124,13 +124,13 @@ A minimal Travis setup could look like this:
```yaml
language: rust
cache: cargo
before_script: (cargo install rustfmt || true)
before_script:
- export PATH="$PATH:$HOME/.cargo/bin"
- which rustfmt || cargo install rustfmt
script:
- |
export PATH=$PATH:~/.cargo/bin &&
cargo fmt -- --write-mode=diff &&
cargo build &&
cargo test
- cargo fmt -- --write-mode=diff
- cargo build
- cargo test
```
Note that using `cache: cargo` is optional but highly recommended to speed up the installation.