Run the new nightly cargo fmt (#156)

This commit is contained in:
Tim
2017-07-18 14:54:46 -07:00
committed by GitHub
parent 4dfb3a48c3
commit 5e3cf3c807
23 changed files with 587 additions and 428 deletions

View File

@@ -67,7 +67,7 @@ else
fi
printf "${PREFIX} Checking for rustfmt ... "
command -v rustfmt &>/dev/null
command -v cargo fmt &>/dev/null
if [ $? == 0 ]; then
printf "${SUCCESS}\n"
else
@@ -93,7 +93,7 @@ diff=""
for file in $(git diff --name-only --cached);
do
if [ ${file: -3} == ".rs" ]; then
diff="$diff$(rustfmt --skip-children --write-mode=diff $file)"
diff="$diff$(cargo fmt -- --skip-children --write-mode=diff $file)"
fi
done
if grep --quiet "^Diff at line" <<< "$diff"; then