use rustfmt on stable only
@@ -9,7 +9,7 @@ rust:
before_script:
- export PATH=$HOME/.cargo/bin:$HOME/.local/bin:$PATH
- - rustup component add rustfmt
+ - if [[ $(rustup show active-toolchain) == stable* ]]; then rustup component add rustfmt; fi;
script:
- if [[ $(rustup show active-toolchain) == stable* ]]; then cargo fmt -- --check; fi;
