#!/usr/bin/env bash
# Mirrors the CI "cargo fmt" gate so formatting failures are caught before push.
# Enable once per clone with:  git config core.hooksPath .githooks
set -euo pipefail

if ! cargo fmt --all -- --check; then
    echo
    echo "✗ cargo fmt check failed. Run:  cargo fmt --all" >&2
    echo "  then re-stage and commit." >&2
    exit 1
fi
