Update pre-commit for changes to cargo fmt.

--write-mode is now --check.
This commit is contained in:
Tim Kuehn
2020-08-19 17:51:20 -07:00
parent 0602afd50c
commit 3207affb4a

View File

@@ -93,7 +93,7 @@ diff=""
for file in $(git diff --name-only --cached);
do
if [ ${file: -3} == ".rs" ]; then
diff="$diff$(cargo fmt -- --skip-children --write-mode=diff $file)"
diff="$diff$(cargo fmt -- --unstable-features --skip-children --check $file)"
fi
done
if grep --quiet "^[-+]" <<< "$diff"; then