language: rust rust: - stable - beta - nightly before_script: - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly*" ]]; then rustup component add rustfmt-preview fi' script: - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly*" ]]; then cargo fmt --all -- --check fi' - cargo build - cargo test matrix: allow_failures: - rust: nightly