summaryrefslogtreecommitdiff
path: root/cli/lsp/cache.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/cache.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/cache.rs')
-rw-r--r--cli/lsp/cache.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs
index f047e5fd4..df88254ee 100644
--- a/cli/lsp/cache.rs
+++ b/cli/lsp/cache.rs
@@ -8,6 +8,7 @@ use deno_core::ModuleSpecifier;
use std::collections::HashMap;
use std::fs;
use std::path::Path;
+use std::path::PathBuf;
use std::sync::Arc;
use std::time::SystemTime;
@@ -97,7 +98,7 @@ impl CacheMetadata {
Some(metadata)
}
- pub fn set_location(&mut self, location: &Path) {
+ pub fn set_location(&mut self, location: PathBuf) {
self.cache = HttpCache::new(location);
self.metadata.lock().clear();
}