Skip to content

Commit eebafc7

Browse files
committed
force PR code to be formatted
1 parent 2207302 commit eebafc7

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ install:
2222
- bash ci/install.sh
2323

2424
script:
25+
# code must be already formatted
26+
- cargo fmt -- --check
2527
- bash ci/script.sh
2628

2729
after_script: set +e

ci/install.sh

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ main() {
55
cargo install cross
66
fi
77

8+
rustup component add rustfmt-preview
9+
810
rustup target add x86_64-unknown-linux-musl
911

1012
if [ $TARGET != x86_64-unknown-linux-gnu ]; then

ci/script.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ main() {
1010
# generate tests
1111
cargo run --package test-generator --target x86_64-unknown-linux-musl
1212

13-
if cargo fmt --version >/dev/null 2>&1; then
14-
# nicer syntax error messages (if any)
15-
cargo fmt
16-
fi
13+
# nicer syntax error messages (if any)
14+
cargo fmt
1715

1816
# run tests
1917
cross test --target $TARGET --release

0 commit comments

Comments
 (0)