#!/bin/bash

set -ev

if [ -z ${RUN_RUSTFMT+x} ]; then
    echo "Not on stable channel: skipping rustfmt."
else
    rustup component add rustfmt
    cargo fmt --all -- --check -v
fi
