From 0ed3d90f19eb758d441527feabf6b5ebfd509afc Mon Sep 17 00:00:00 2001 From: Atul Bhosale Date: Wed, 18 Mar 2020 23:29:36 +0530 Subject: [PATCH] Add cargo fmt to travis build config --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index e2c33a3..646f42f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,8 @@ rust: - stable - beta - nightly + +script: + - if [[ "$TRAVIS_RUST_VERSION" == *stable* ]]; then rustup component add rustfmt; cargo fmt --version; cargo fmt -- --check || (echo "Please reformat your code with 'cargo fmt' (version $(cargo fmt --version))"; false); fi + - cargo build -v + - cargo test -v