#!/bin/bash cargo fmt -- --check result=$? if [[ ${result} -ne 0 ]]; then cat <<\EOF There are some code style issues, please run `cargo fmt` first. EOF exit 1 fi exit 0