diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 508ed1c..157e647 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,6 +28,11 @@ defaults: jobs: fmt: uses: smol-rs/.github/.github/workflows/fmt.yml@main + clippy: + uses: smol-rs/.github/.github/workflows/clippy.yml@main + with: + # Windows for windows module. + additional-targets: x86_64-pc-windows-msvc security_audit: uses: smol-rs/.github/.github/workflows/security_audit.yml@main permissions: @@ -48,10 +53,13 @@ jobs: - name: Install Rust # --no-self-update is necessary because the windows environment cannot self-update rustup.exe. run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} + - name: Install cargo-hack and cargo-minimal-versions + uses: taiki-e/install-action@v2 + with: + tool: cargo-hack,cargo-minimal-versions - run: cargo build --all --all-features --all-targets - - name: Run cargo check (without dev-dependencies to catch missing feature flags) - if: startsWith(matrix.rust, 'nightly') - run: cargo check -Z features=dev_dep + - run: cargo hack build --feature-powerset --no-dev-deps + - run: cargo minimal-versions build --all --all-features - run: cargo test msrv: @@ -65,11 +73,3 @@ jobs: - name: Install cargo-hack uses: taiki-e/install-action@cargo-hack - run: cargo hack build --rust-version - - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update stable - - run: cargo clippy --all-features --all-targets diff --git a/src/lib.rs b/src/lib.rs index 8e5a330..ee964ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -318,6 +318,7 @@ pub struct ReadDir(State); /// The state of an asynchronous `ReadDir`. /// /// The `ReadDir` can be either idle or busy performing an asynchronous operation. +#[allow(clippy::large_enum_variant)] // TODO: Windows-specific enum State { Idle(Option), Busy(blocking::Task<(std::fs::ReadDir, Option>)>),