blob: bd268600ec8fa170fb5bcd073e1d3fe6cfa1bacf [file] [log] [blame]
#!/usr/bin/env bash
set -xeu
cd "$(dirname "$0")/.."
# Ensure we have the most up-to-date `rustfmt`.
cargo install -f rustfmt
# Run `rustfmt` on the crate! If `rustfmt` can't make a long line shorter, it
# prints an error and exits non-zero, so tell it to kindly shut its yapper and
# make sure it doesn't cause us to exit this whole script non-zero.
cargo fmt --quiet || true
# Exit non-zero if this resulted in any diffs.
./ci/assert-no-diff.sh