|
|
@@ -35,13 +35,13 @@ the current date, and a new section above is created.
|
|
|
## cargo fmt pre-commit hook
|
|
|
|
|
|
To ensure every contributor uses the same code style, make sure
|
|
|
-you run `cargo +nightly fmt` before committing. You can force yourself
|
|
|
+you run `cargo fmt` before committing. You can force yourself
|
|
|
to do this by creating a git `pre-commit` hook like the following:
|
|
|
|
|
|
```shell
|
|
|
#!/bin/sh
|
|
|
-if ! cargo +nightly fmt -- --check >/dev/null; then
|
|
|
- echo "There are some code style issues. Run 'cargo +nightly fmt' to fix it."
|
|
|
+if ! cargo fmt -- --check >/dev/null; then
|
|
|
+ echo "There are some code style issues. Run 'cargo fmt' to fix it."
|
|
|
exit 1
|
|
|
fi
|
|
|
|