From a50c7b54f17a534e9701abfd5a9e9cef4c5bf010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 16 Aug 2024 15:40:34 +0300 Subject: [PATCH] ci: Clean up cargo fmt step --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cce02b..383bc9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,12 +27,11 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - - run: rustup component add rustfmt-preview - - name: cargo fmt --all -- --check if stable + - name: cargo fmt --all -- --check run: | - if [ "${{ matrix.rust }}" = "stable" ]; then - cargo fmt --all -- --check - fi + rustup component add rustfmt-preview + cargo fmt --all -- --check + if: matrix.toolchain == 'stable' - run: | cargo build --verbose - run: |