diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2023-05-12 19:07:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-12 19:07:40 -0400 |
commit | 68c0fcb157bb47bbf58bcdcecf59d237fb84f201 (patch) | |
tree | 3c57e1c153412f18e8741e6b0af0a637389f9ea8 /cli/npm/cache.rs | |
parent | 7476ee34fadcefee630edbc564186155acebdf94 (diff) |
refactor(lsp): make `RequestMethod` private (#19114)
Diffstat (limited to 'cli/npm/cache.rs')
-rw-r--r-- | cli/npm/cache.rs | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/cli/npm/cache.rs b/cli/npm/cache.rs index cda40fd17..aba6c0cca 100644 --- a/cli/npm/cache.rs +++ b/cli/npm/cache.rs @@ -20,7 +20,6 @@ use deno_semver::Version; use once_cell::sync::Lazy; use crate::args::CacheSetting; -use crate::cache::DenoDir; use crate::http_util::HttpClient; use crate::util::fs::canonicalize_path; use crate::util::fs::hard_link_dir_recursive; @@ -120,20 +119,6 @@ pub struct ReadonlyNpmCache { root_dir_url: Url, } -// todo(dsherret): implementing Default for this is error prone because someone -// might accidentally use the default implementation instead of getting the -// correct location of the deno dir, which might be provided via a CLI argument. -// That said, the rest of the LSP code does this at the moment and so this code -// copies that. -impl Default for ReadonlyNpmCache { - 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. - Self::new(DenoDir::new(None).unwrap().npm_folder_path()) - } -} - impl ReadonlyNpmCache { pub fn new(root_dir: PathBuf) -> Self { fn try_get_canonicalized_root_dir( |