```yaml
language: rust
cache: cargo
-before_script: (cargo install rustfmt || true)
+before_script:
+- export PATH="$PATH:$HOME/.cargo/bin"
+- which rustfmt || cargo install rustfmt
script:
-- |
- export PATH=$PATH:~/.cargo/bin &&
- cargo fmt -- --write-mode=diff &&
- cargo build &&
- cargo test
+- cargo fmt -- --write-mode=diff
+- cargo build
+- cargo test
```
Note that using `cache: cargo` is optional but highly recommended to speed up the installation.
source code, [src/config.rs](src/config.rs).
By default, Rustfmt uses a style which (mostly) conforms to the
-[Rust style guidelines](https://github.com/rust-lang/rust/tree/master/src/doc/style).
+[Rust style guidelines](https://doc.rust-lang.org/1.12.0/style/README.html).
There are many details which the style guidelines do not cover, and in these
cases we try to adhere to a style similar to that used in the
[Rust repo](https://github.com/rust-lang/rust). Once Rustfmt is more complete, and