From c32c65c4757f02c7837a137a1ffd16cf3fab48a5 Mon Sep 17 00:00:00 2001 From: konstin Date: Thu, 19 Sep 2024 12:50:31 +0200 Subject: [PATCH] Add clippy to CI --- .github/workflows/CI.yml | 7 +++++++ src/distribution.rs | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 16905c5..12d6bda 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,6 +37,13 @@ jobs: - run: cargo +nightly update -Z minimal-versions - run: cargo +stable test + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: rustup component add clippy + - run: cargo clippy --all-features --locked -- -D warnings + fmt: name: Rustfmt runs-on: ubuntu-latest diff --git a/src/distribution.rs b/src/distribution.rs index 9abc87b..d4bdf9c 100644 --- a/src/distribution.rs +++ b/src/distribution.rs @@ -164,7 +164,7 @@ impl Distribution { #[cfg(feature = "xz")] SDistType::XzTar => Self::parse_tar(XzDecoder::new_stream( BufReader::new(fs_err::File::open(path)?), - XzStream::new_auto_decoder(u64::max_value(), 0).unwrap(), + XzStream::new_auto_decoder(u64::MAX, 0).unwrap(), )), } }