From eee2de02446d6530ded45159d816b921651539f9 Mon Sep 17 00:00:00 2001 From: Casper Meijn Date: Fri, 19 Apr 2024 15:21:25 +0200 Subject: [PATCH] chore: Fix clippy checks in CI (#1032) * chore: Fix needless borrow * ci: Clippy requires checking out submodules * ci: Exclude `protobuf` project from clippy --- .github/workflows/ci.yml | 4 +++- protobuf/build.rs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23a7af61b..6ca8d776b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + submodules: 'recursive' - name: install protoc uses: taiki-e/install-action@v2 with: @@ -34,7 +36,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: clippy - - run: cargo clippy --workspace --all-features --tests -- -D warnings + - run: cargo clippy --workspace --exclude protobuf --all-features --tests -- -D warnings machete: runs-on: ubuntu-latest diff --git a/protobuf/build.rs b/protobuf/build.rs index 6ab495be6..683557e0a 100644 --- a/protobuf/build.rs +++ b/protobuf/build.rs @@ -131,7 +131,7 @@ fn apply_patches(src_dir: &Path) -> Result<()> { .arg("-p1") .arg("-i") .arg(patch_src) - .current_dir(&src_dir) + .current_dir(src_dir) .status() .context("failed to apply patch")?; // exit code: 0 means success; 1 means already applied