refactor(deno_graph): remove unused Resolved::Ok#kind usage (#17504)

See https://github.com/denoland/deno_graph/pull/205 for more details.
This commit is contained in:
David Sherret 2023-01-24 14:23:19 +01:00 committed by GitHub
parent 0d1471282b
commit 654e177c91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 75 additions and 172 deletions

View file

@ -8,7 +8,6 @@ use deno_core::serde_json;
use deno_core::serde_json::json;
use deno_core::serde_json::Value;
use deno_core::ModuleSpecifier;
use deno_graph::ModuleKind;
use import_map::ImportMap;
use log::error;
use log::warn;
@ -158,7 +157,7 @@ impl LanguageServer {
) -> LspResult<Option<Value>> {
async fn create_graph_for_caching(
cli_options: CliOptions,
roots: Vec<(ModuleSpecifier, ModuleKind)>,
roots: Vec<ModuleSpecifier>,
open_docs: Vec<Document>,
) -> Result<(), AnyError> {
let open_docs = open_docs
@ -2917,7 +2916,7 @@ impl tower_lsp::LanguageServer for LanguageServer {
struct PrepareCacheResult {
cli_options: CliOptions,
roots: Vec<(ModuleSpecifier, ModuleKind)>,
roots: Vec<ModuleSpecifier>,
open_docs: Vec<Document>,
mark: PerformanceMark,
}
@ -2938,15 +2937,10 @@ impl Inner {
params
.uris
.iter()
.map(|t| {
(
self.url_map.normalize_url(&t.uri),
deno_graph::ModuleKind::Esm,
)
})
.map(|t| self.url_map.normalize_url(&t.uri))
.collect()
} else {
vec![(referrer, deno_graph::ModuleKind::Esm)]
vec![referrer]
};
let mut cli_options = CliOptions::new(