Skip to content

Apache DataFusion SQL Query Engine

ARROW-3969: [Rust] Format using stable rustfmt

Andy Grove8006306dc45d
diff --git a/ci/travis_install_cargo.sh b/ci/travis_install_cargo.sh
index f433033091..e4a6b3b349 100755
--- a/ci/travis_install_cargo.sh
+++ b/ci/travis_install_cargo.sh
@@ -21,6 +21,7 @@ set -e
# ensure that both toolchains are installed
rustup install stable
+rustup component add rustfmt
rustup install nightly
pip install 'travis-cargo<0.2' --user
diff --git a/ci/travis_script_rust.sh b/ci/travis_script_rust.sh
index 02a32cdabe..55cce8f354 100755
--- a/ci/travis_script_rust.sh
+++ b/ci/travis_script_rust.sh
@@ -26,13 +26,8 @@ pushd $RUST_DIR
# show activated toolchain
rustup show
-# check code formatting only for Rust nightly
-if [ $RUSTUP_TOOLCHAIN == "nightly" ]
-then
- # raises on any formatting errors
- rustup component add rustfmt-preview
- cargo fmt --all -- --check
-fi
+# raises on any formatting errors
+cargo +stable fmt --all -- --check
# raises on any warnings
cargo rustc -- -D warnings