summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.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/diagnostics.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/diagnostics.rs')
-rw-r--r--cli/lsp/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs
index 6af6c92b3..9acb9cef5 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -1198,7 +1198,7 @@ mod tests {
location: &Path,
maybe_import_map: Option<(&str, &str)>,
) -> StateSnapshot {
- 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");
@@ -1243,7 +1243,7 @@ mod tests {
sources: &[(&str, &str, i32, LanguageId)],
maybe_import_map: Option<(&str, &str)>,
) -> (StateSnapshot, PathBuf) {
- let location = temp_dir.path().join("deps");
+ let location = temp_dir.path().join("deps").to_path_buf();
let state_snapshot =
mock_state_snapshot(sources, &location, maybe_import_map);
(state_snapshot, location)