From 752fff9de967095a9a6fe4383999e030954f5300 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 18 Jul 2023 16:35:12 -0400 Subject: [PATCH] ci: upgrade caching (#23) --- .github/workflows/ci.yml | 5 +++-- rust-toolchain.toml | 2 +- src/resolution/graph.rs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dc301a..3ae81f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,8 +28,9 @@ jobs: - uses: denoland/setup-deno@v1 - uses: dsherret/rust-toolchain-file@v1 - - name: Cache - uses: Swatinem/rust-cache@v1 + - uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref == 'refs/heads/main' }} - name: Format run: cargo fmt --all -- --check diff --git a/rust-toolchain.toml b/rust-toolchain.toml index dfc5c81..e1e8b08 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.68.2" +channel = "1.71.0" components = ["clippy", "rustfmt"] profile = "minimal" diff --git a/src/resolution/graph.rs b/src/resolution/graph.rs index b731783..9039d5f 100644 --- a/src/resolution/graph.rs +++ b/src/resolution/graph.rs @@ -969,7 +969,7 @@ impl<'a, TNpmRegistryApi: NpmRegistryApi> if !has_deps { // ensure this is set if not, as it's an optimization - let mut node = self.graph.borrow_node_mut(node_id); + let node = self.graph.borrow_node_mut(node_id); node.no_peers = true; }