Skip to content

Commit

Permalink
add --fix option to rust_fmt.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
remybar committed Nov 19, 2024
1 parent 87275f1 commit 9ffe3e7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion scripts/rust_fmt.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
#!/bin/bash

cargo +nightly-2024-08-28 fmt --check --all -- "$@"

option="--check"

if [ "$1" == "--fix" ]; then
option=""
shift
fi

cargo +nightly-2024-08-28 fmt $option --all -- "$@"

0 comments on commit 9ffe3e7

Please sign in to comment.