summaryrefslogtreecommitdiff
path: root/cli/npm/resolvers/global.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-04-24 21:07:48 -0400
committerGitHub <noreply@github.com>2023-04-24 21:07:48 -0400
commit5b4a9b48aeabded174cc161bfdafb6529cffbca1 (patch)
tree77a2e82cfe04e2c1c04200496499a11f6d53b7e9 /cli/npm/resolvers/global.rs
parent667acb075c0f1fb62bc1177f46b550e9dd506c00 (diff)
refactor(ext/node): enforce interior mutable for `NodePermissions` to remove clones (#18831)
We can make `NodePermissions` rely on interior mutability (which the `PermissionsContainer` is already doing) in order to not have to clone everything all the time. This also reduces the chance of an accidental `borrow` while `borrrow_mut`.
Diffstat (limited to 'cli/npm/resolvers/global.rs')
-rw-r--r--cli/npm/resolvers/global.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/npm/resolvers/global.rs b/cli/npm/resolvers/global.rs
index 66935380f..79df16187 100644
--- a/cli/npm/resolvers/global.rs
+++ b/cli/npm/resolvers/global.rs
@@ -126,7 +126,7 @@ impl NpmPackageFsResolver for GlobalNpmPackageResolver {
fn ensure_read_permission(
&self,
- permissions: &mut dyn NodePermissions,
+ permissions: &dyn NodePermissions,
path: &Path,
) -> Result<(), AnyError> {
let registry_path = self.cache.registry_folder(&self.registry_url);