Skip to content

Commit 712f3aa

Browse files
committed
travis: improve code style on travis.yml
1 parent 581e3e8 commit 712f3aa

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

.travis.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,22 @@ matrix:
2929
allow_failures:
3030
- rust: nightly
3131

32-
before_script:
33-
- export PATH=$HOME/.cargo/bin:$PATH
34-
- |
35-
if [[ $TASK = "lint" ]]; then
36-
if ! type -p cargo-install-update; then
37-
cargo install --force cargo-update
38-
else
39-
cargo install-update -i cargo-update
40-
fi
41-
42-
rustup component add rustfmt-preview
43-
cargo install-update -i "clippy:$CLIPPY_VERSION"
44-
fi
45-
script:
46-
- |
47-
if [[ $TASK = "lint" ]]; then
48-
cargo fmt -- --write-mode diff
49-
cargo clippy
50-
elif [[ $TASK = "test" ]]; then
51-
cargo build && cargo test
52-
fi
32+
before_script: |
33+
if [[ $TASK = "lint" ]]; then
34+
if ! type -p cargo-install-update; then
35+
cargo install --force cargo-update
36+
else
37+
cargo install-update -i cargo-update
38+
fi
39+
40+
rustup component add rustfmt-preview
41+
cargo install-update -i "clippy:$CLIPPY_VERSION"
42+
fi
43+
44+
script: |
45+
if [[ $TASK = "lint" ]]; then
46+
cargo fmt -- --write-mode diff
47+
cargo clippy
48+
elif [[ $TASK = "test" ]]; then
49+
cargo build && cargo test
50+
fi

0 commit comments

Comments
 (0)