Using cargo-update to update the rustfmt on travis

This commit is contained in:
Adit Cahya Ramadhan 2017-10-21 10:21:56 +07:00 committed by David Peter
parent 701b8f209b
commit 15a3ca0c80

View file

@ -78,12 +78,16 @@ matrix:
- os: linux
rust: stable
# skip the global install step
install: which rustfmt || cargo install rustfmt
install:
- which cargo-install-update || cargo install cargo-update
- cargo install-update rustfmt
script: cargo fmt -- --write-mode=diff
- os: linux
rust: nightly
# skip the global install step
install: which rustfmt || cargo install rustfmt-nightly
install:
- which cargo-install-update || cargo install cargo-update
- cargo install-update rustfmt-nightly
script: cargo fmt -- --write-mode=diff
addons: