1 2 3 4 5 6 7 8 9 10
#!/bin/bash set -e if [[ ! "$(cargo fmt --version | grep 0.8.2-nightly)" ]]; then echo "Rustfmt version 0.8.2-nightly needed" exit 1 fi cargo fmt -- --check