Update regex to match diffs output by cargo fmt. (#208)

It appears the header of the diffs output by cargo fmt have changed. It now says "Diff in /blah/blah/blah.rs at line 99:" Matching on lines starting with + or - should be more future-proof against changes to the surroundings.
This commit is contained in:
Tyler Bindon
2018-12-09 01:59:35 -08:00
committed by Tim
parent 2a3162c5fa
commit 959bb691cd

View File

@@ -96,7 +96,7 @@ do
diff="$diff$(cargo fmt -- --skip-children --write-mode=diff $file)"
fi
done
if grep --quiet "^Diff at line" <<< "$diff"; then
if grep --quiet "^[-+]" <<< "$diff"; then
FMTRESULT=1
fi