language: rust
rust:
- stable
- beta
- nightly
cache: cargo
before_script:
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then (rustup component add rustfmt-preview clippy-preview) fi
script:
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then (cargo fmt --all -- --check) fi
- if [ "$TRAVIS_RUST_VERSION" = "nightly" ]; then (cargo clippy) fi
- cargo test