rust: stop depending on nightly for fmt

This commit is contained in:
Alexandre Franke 2018-12-12 22:47:09 +01:00 committed by Daniel Garcia Moreno
parent 93472c1a4a
commit a4f09bdd41

View file

@ -8,16 +8,16 @@ if ! which rustup &> /dev/null; then
fi fi
fi fi
if ! rustup component list --toolchain nightly|grep rustfmt-preview &> /dev/null; then if ! rustup component list|grep rustfmt &> /dev/null; then
echo "Installing nightly rustfmt.." echo "Installing rustfmt.."
rustup component add rustfmt-preview --toolchain nightly rustup component add rustfmt
fi fi
echo "--Checking style--" echo "--Checking style--"
cargo +nightly fmt --all -- --check cargo fmt --all -- --check
if test $? != 0; then if test $? != 0; then
echo "--Checking style fail--" echo "--Checking style fail--"
echo "Please fix the above issues, either manually or by running: cargo +nightly fmt --all" echo "Please fix the above issues, either manually or by running: cargo fmt --all"
exit -1 exit -1
else else