language: rust
rust: nightly
cache: cargo
before_script: (cargo install rustfmt || true)
script:
- |
  cargo fmt -- --write-mode=diff &&
  cargo build &&
  cargo test

language: rust
rust: nightly
cache: cargo
before_script: (cargo install rustfmt || true)
script:
- |
  PATH=$HOME/.cargo/bin:$PATH;
  cargo fmt -- --write-mode=diff &&
  cargo build &&
  cargo test

Add cargo bin to PATH for rustfmt
Add cargo bin to PATH for rustfmt
