diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-06-10 11:09:45 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-10 11:09:45 -0400 |
commit | 7f15126f23d97f20a4fb33e43136cd4d13825863 (patch) | |
tree | 85d77389969b31999680059e65954a9fa863758e /cli/lsp/language_server.rs | |
parent | f3326eebd6af2aaca1543e8cb543a7b16762bc96 (diff) |
chore(tests): test_util - Add `PathRef` (#19450)
This adds a new `PathRef` struct to test_util for making it easier to
work with paths in test code. I'm going to expand on this more in the
future.
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r-- | cli/lsp/language_server.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index ecd91f459..cf7179670 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -605,11 +605,13 @@ impl Inner { let dir = DenoDir::new(None).expect("could not access DENO_DIR"); let module_registries_location = dir.registries_folder_path(); let http_client = Arc::new(HttpClient::new(None, None)); - let module_registries = - ModuleRegistry::new(&module_registries_location, http_client.clone()); + let module_registries = ModuleRegistry::new( + module_registries_location.clone(), + http_client.clone(), + ); let location = dir.deps_folder_path(); - let documents = Documents::new(&location); - let deps_http_cache = HttpCache::new(&location); + let documents = Documents::new(location.clone()); + let deps_http_cache = HttpCache::new(location); let cache_metadata = cache::CacheMetadata::new(deps_http_cache.clone()); let performance = Arc::new(Performance::default()); let ts_server = Arc::new(TsServer::new(performance.clone())); @@ -944,14 +946,14 @@ impl Inner { .clone(), )); self.module_registries = ModuleRegistry::new( - &module_registries_location, + module_registries_location.clone(), self.http_client.clone(), ); self.module_registries_location = module_registries_location; // update the cache path let location = dir.deps_folder_path(); - self.documents.set_location(&location); - self.cache_metadata.set_location(&location); + self.documents.set_location(location.clone()); + self.cache_metadata.set_location(location); self.maybe_cache_path = new_cache_path; Ok(()) } |