#!/bin/bash

# Format all sources using rustfmt.

# Exit immediately on errors.
set -e

cd $(dirname "$0")
src=$(pwd)

for crate in $(find "$src" -name Cargo.toml); do
    cd $(dirname "$crate")
    cargo fmt
done

Add a script for reformatting all sources.
Add a script for reformatting all sources.

This is mostly useful when updating to a new version of rustfmt with different
behavior.
