From 8e0e65ed429cd447f8b7af1f43e2a8eb92e3b385 Mon Sep 17 00:00:00 2001 From: Loong <40141251+wangl-cc@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:51:17 +0100 Subject: [PATCH] ci: use nightly rustfmt for formatting check --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bad2bc8..f5bff809 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,8 @@ jobs: cargo clippy --package maa-cli -- -D warnings - name: Lint (rustfmt) run: | - cargo fmt --package maa-cli -- --check + rustup toolchain install nightly -c rustfmt + cargo +nightly fmt --package maa-cli -- --check - name: Install MaaCore env: MAA_CONFIG_DIR: ${{ github.workspace }}/maa-cli/config_examples @@ -154,7 +155,9 @@ jobs: - name: Lint (clippy) run: cargo clippy --package maa-sys -- -D warnings - name: Lint (fmt) - run: cargo fmt --package maa-sys -- --check + run: | + rustup toolchain install nightly -c rustfmt + cargo +nightly fmt --package maa-sys -- --check - name: Test # It seems rust needs a static library to check the linking. # Without this, we can not link maa-sys to MaaCore on Windows.