chore: add rust git hooks

This commit is contained in:
ao xing 2026-06-18 12:36:44 +02:00
parent d229a9b022
commit e7ed71b1a1
2 changed files with 6 additions and 0 deletions

3
.githooks/pre-commit Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd "$(dirname "$0")/../rust" || exit 1
cargo fmt --all -- --check

3
.githooks/pre-push Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
cd "$(dirname "$0")/../rust" || exit 1
cargo clippy -- -D warnings