Skip children when rustfmting in pre-commit

This commit is contained in:
Tim Kuehn
2016-02-25 00:18:51 -08:00
parent 3543b34f2b
commit ef96c87226

View File

@@ -93,7 +93,7 @@ for file in $(git diff --name-only --cached);
do
if [ ${file: -3} == ".rs" ]; then
HASH=$(shasum < $file)
NEW_HASH=$(rustfmt --write-mode=display < $file | shasum)
NEW_HASH=$(rustfmt --skip-children --write-mode=display < $file | shasum)
echo $HASH
echo $NEW_HASH
if [ "${HASH}" != "${NEW_HASH}" ]; then