summaryrefslogtreecommitdiff
path: root/cli/lsp/registries.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2023-07-08 16:06:45 -0400
committerGitHub <noreply@github.com>2023-07-08 16:06:45 -0400
commit21cc279481ac5bffc29641e917e868dca42189d3 (patch)
tree4e0201da6a5d6beaff5139a84e4c52ec5e9affd6 /cli/lsp/registries.rs
parentf3095b8d311c85f633d280a980f76062015f8974 (diff)
refactor: abstract away file system to be buried inside HttpCache (#19760)
This improves the HttpCache to make it being stored on the file system an implementation detail.
Diffstat (limited to 'cli/lsp/registries.rs')
-rw-r--r--cli/lsp/registries.rs13
1 files changed, 0 insertions, 13 deletions
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs
index 9454f77f5..9586997c5 100644
--- a/cli/lsp/registries.rs
+++ b/cli/lsp/registries.rs
@@ -13,7 +13,6 @@ use super::path_to_regex::StringOrVec;
use super::path_to_regex::Token;
use crate::args::CacheSetting;
-use crate::cache::DenoDir;
use crate::cache::HttpCache;
use crate::file_fetcher::FileFetcher;
use crate::http_util::HttpClient;
@@ -418,18 +417,6 @@ pub struct ModuleRegistry {
file_fetcher: FileFetcher,
}
-impl Default for ModuleRegistry {
- fn default() -> Self {
- // This only gets used when creating the tsc runtime and for testing, and so
- // it shouldn't ever actually access the DenoDir, so it doesn't support a
- // custom root.
- let dir = DenoDir::new(None).unwrap();
- let location = dir.registries_folder_path();
- let http_client = Arc::new(HttpClient::new(None, None));
- Self::new(location, http_client)
- }
-}
-
impl ModuleRegistry {
pub fn new(location: PathBuf, http_client: Arc<HttpClient>) -> Self {
let http_cache = HttpCache::new(location);