summaryrefslogtreecommitdiff
path: root/cli/lsp/completions.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-06-10 11:09:45 -0400
committerGitHub <noreply@github.com>2023-06-10 11:09:45 -0400
commit7f15126f23d97f20a4fb33e43136cd4d13825863 (patch)
tree85d77389969b31999680059e65954a9fa863758e /cli/lsp/completions.rs
parentf3326eebd6af2aaca1543e8cb543a7b16762bc96 (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/completions.rs')
-rw-r--r--cli/lsp/completions.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs
index 070e3168a..17a00010b 100644
--- a/cli/lsp/completions.rs
+++ b/cli/lsp/completions.rs
@@ -519,13 +519,13 @@ mod tests {
source_fixtures: &[(&str, &str)],
location: &Path,
) -> Documents {
- let mut documents = Documents::new(location);
+ let mut documents = Documents::new(location.to_path_buf());
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);
+ let http_cache = HttpCache::new(location.to_path_buf());
for (specifier, source) in source_fixtures {
let specifier =
resolve_url(specifier).expect("failed to create specifier");
@@ -546,7 +546,7 @@ mod tests {
sources: &[(&str, &str)],
) -> Documents {
let location = temp_dir.path().join("deps");
- mock_documents(documents, sources, &location)
+ mock_documents(documents, sources, location.as_path())
}
#[test]