diff options
Diffstat (limited to 'cli/lsp/completions.rs')
-rw-r--r-- | cli/lsp/completions.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs index 73ec5a918..a895239a6 100644 --- a/cli/lsp/completions.rs +++ b/cli/lsp/completions.rs @@ -505,6 +505,7 @@ fn get_workspace_completions( #[cfg(test)] mod tests { use super::*; + use crate::cache::GlobalHttpCache; use crate::cache::HttpCache; use crate::lsp::documents::Documents; use crate::lsp::documents::LanguageId; @@ -519,14 +520,14 @@ mod tests { source_fixtures: &[(&str, &str)], location: &Path, ) -> Documents { - let cache = HttpCache::new(location.to_path_buf()); + let cache = Arc::new(GlobalHttpCache::new(location.to_path_buf())); let mut documents = Documents::new(cache); for (specifier, source, version, language_id) in fixtures { let specifier = resolve_url(specifier).expect("failed to create specifier"); documents.open(specifier, *version, *language_id, (*source).into()); } - let http_cache = HttpCache::new(location.to_path_buf()); + let http_cache = GlobalHttpCache::new(location.to_path_buf()); for (specifier, source) in source_fixtures { let specifier = resolve_url(specifier).expect("failed to create specifier"); |