mirror of
https://github.com/async-rs/async-std.git
synced 2025-04-24 01:06:46 +00:00
Use the latest toolchain with rustfmt available if rustfmt is unavailable on the latest nightly (#155)
This commit is contained in:
parent
481002ee71
commit
5d73776c69
1 changed files with 8 additions and 2 deletions
10
.travis.yml
10
.travis.yml
|
@ -18,8 +18,14 @@ matrix:
|
||||||
- name: fmt
|
- name: fmt
|
||||||
rust: nightly
|
rust: nightly
|
||||||
os: linux
|
os: linux
|
||||||
before_script:
|
before_script: |
|
||||||
- rustup component add rustfmt
|
if ! rustup component add rustfmt; then
|
||||||
|
target=`curl https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/rustfmt`;
|
||||||
|
echo "'rustfmt' is unavailable on the toolchain 'nightly', use the toolchain 'nightly-$target' instead";
|
||||||
|
rustup toolchain install nightly-$target;
|
||||||
|
rustup default nightly-$target;
|
||||||
|
rustup component add rustfmt;
|
||||||
|
fi
|
||||||
script:
|
script:
|
||||||
- cargo fmt --all -- --check
|
- cargo fmt --all -- --check
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue