Browse Source

ci: Fix pre-commit hook

Because rustfmt isn't aware of the cargo manifest, it would complain that
we use async methods with the rust 2015 version.
merge-requests/1327/merge
Kévin Commaille 4 years ago committed by Kévin Commaille
parent
commit
808f4b5a26
  1. 3
      scripts/checks.sh

3
scripts/checks.sh

@ -210,8 +210,7 @@ run_rustfmt() {
staged_files=`git diff --name-only --cached | grep '.rs$'`
result=0
for file in ${staged_files[@]}; do
if ! rustfmt --unstable-features --skip-children --check $file; then
if ! cargo +nightly fmt -- --unstable-features --skip-children --check $file; then
result=1
fi
done

Loading…
Cancel
Save