mirror of
https://gitlab.com/msrd0/gotham-restful.git
synced 2025-02-23 13:02:28 +00:00
16 lines
334 B
Bash
16 lines
334 B
Bash
![]() |
#!/bin/bash
|
||
|
set -euo pipefail
|
||
|
|
||
|
rustfmt=${RUSTFMT:-rustfmt}
|
||
|
version="$($rustfmt -V)"
|
||
|
if [[ $version != *nightly* ]]; then
|
||
|
rustfmt="$rustfmt +nightly"
|
||
|
fi
|
||
|
|
||
|
return=0
|
||
|
find "$(dirname "$0")" -name '*.rs' -type f | while read file; do
|
||
|
$rustfmt --config-path "$(dirname "$0")/../../rustfmt.toml" "$@" "$file" || return=1
|
||
|
done
|
||
|
|
||
|
exit $return
|