#!/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