[fractal] ci: Fix pre-commit hook
- From: Kévin Commaille <kcommaille src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] ci: Fix pre-commit hook
- Date: Sat, 21 May 2022 12:55:01 +0000 (UTC)
commit 808f4b5a2654f0f1bcc861decbd7bd97585921d9
Author: Kévin Commaille <zecakeh tedomum fr>
Date: Sat May 21 10:32:25 2022 +0200
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.
scripts/checks.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/scripts/checks.sh b/scripts/checks.sh
index 0cf92b6a3..0e7ccabea 100755
--- a/scripts/checks.sh
+++ b/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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]