mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-04-28 11:46:07 +08:00
docs: Specify --edition 2021 in pre-commit hook (was failing on async keyword)
This commit is contained in:
@@ -101,7 +101,7 @@ you push your code. Follow these instruction to set it up:
|
||||
2. Change the content of `.git/hooks/pre-commit` to be the following
|
||||
```sh
|
||||
#!/bin/sh
|
||||
git diff --name-only --staged | grep '\.rs$' | xargs -P 8 -I {} rustfmt {} --check --config group_imports=StdExternalCrate || (
|
||||
git diff --name-only --staged | grep '\.rs$' | xargs -P 8 -I {} rustfmt {} --edition 2021 --check --config group_imports=StdExternalCrate || (
|
||||
echo 'rustfmt failed: run "cargo fmt --all -- --config group_imports=StdExternalCrate"';
|
||||
exit 1
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user