summaryrefslogtreecommitdiff
path: root/cli/lsp/config.rs
diff options
context:
space:
mode:
authorGeert-Jan Zwiers <geertjanzwiers@protonmail.com>2023-01-26 23:24:03 +0100
committerGitHub <noreply@github.com>2023-01-26 23:24:03 +0100
commit7f38f30a5c0eb06c5b85d1c7ac26a480c210aab6 (patch)
tree805c717b5aaf7124a09a3f19f6d2c2d459d2d959 /cli/lsp/config.rs
parent21065797f6dce285e55705007f54abe2bafb611c (diff)
refactor(lsp): fewer clones (#17551)
Diffstat (limited to 'cli/lsp/config.rs')
-rw-r--r--cli/lsp/config.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/lsp/config.rs b/cli/lsp/config.rs
index 2d7f81fde..3da9f7a07 100644
--- a/cli/lsp/config.rs
+++ b/cli/lsp/config.rs
@@ -560,8 +560,7 @@ impl Config {
for (workspace, folder) in workspace_folders {
if let Ok(settings) = client.specifier_configuration(&folder.uri).await
{
- if self.update_enabled_paths_entry(&workspace, settings.enable_paths)
- {
+ if self.update_enabled_paths_entry(workspace, settings.enable_paths) {
touched = true;
}
}
@@ -569,7 +568,7 @@ impl Config {
touched
} else if let Some(root_uri) = self.root_uri.clone() {
self.update_enabled_paths_entry(
- &root_uri,
+ root_uri,
self.settings.workspace.enable_paths.clone(),
)
} else {
@@ -580,10 +579,10 @@ impl Config {
/// Update a specific entry in the enabled paths for a given workspace.
fn update_enabled_paths_entry(
&mut self,
- workspace: &ModuleSpecifier,
+ workspace: ModuleSpecifier,
enabled_paths: Vec<String>,
) -> bool {
- let workspace = ensure_directory_specifier(workspace.clone());
+ let workspace = ensure_directory_specifier(workspace);
let key = workspace.to_string();
let mut touched = false;
if !enabled_paths.is_empty() {