Handle rustfmt installation better

pull/3/head
Bradlee Speice 2018-12-08 19:10:25 -05:00
parent 9e5b2b0f7a
commit 4623b43890
1 changed files with 5 additions and 1 deletions

View File

@ -42,7 +42,11 @@ install:
- source ~/.cargo/env || true
script:
- rustup component add rustfmt
- if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then
rustup component add rustfmt-preview
else
rustup component add rustfmt
fi
- cargo fmt --all -- --check
- |
if [ -z "$TRAVIS_TAG" ]; then