#!/bin/bash
## checks with 'cargo fmt' if the source is well formatted
require git cargo

is_cargo_project || return 0
git_hook_matches "pre-commit" "pre-merge-commit" || return 0

run_test cargo fmt --all -- --check

