summaryrefslogtreecommitdiff
path: root/cli/lsp/documents.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/lsp/documents.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/lsp/documents.rs')
-rw-r--r--cli/lsp/documents.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs
index 31aa3ae8e..3f77eaaa2 100644
--- a/cli/lsp/documents.rs
+++ b/cli/lsp/documents.rs
@@ -1074,7 +1074,7 @@ impl Documents {
&specifier,
referrer,
NodeResolutionMode::Types,
- &mut PermissionsContainer::allow_all(),
+ &PermissionsContainer::allow_all(),
)
.ok()
.flatten(),
@@ -1461,7 +1461,7 @@ fn node_resolve_npm_req_ref(
.resolve_npm_req_reference(
&npm_req_ref,
NodeResolutionMode::Types,
- &mut PermissionsContainer::allow_all(),
+ &PermissionsContainer::allow_all(),
)
.ok()
.flatten(),