diff --git a/.travis.yml b/.travis.yml index 3f6ee92..7eb6ab8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,13 @@ rust: - 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 --verbose --all - cargo run --example nested_struct - cargo run --example simple @@ -11,4 +18,4 @@ script: os: - windows - osx - - linux \ No newline at end of file + - linux