summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2021-02-17 13:47:18 -0500
committerGitHub <noreply@github.com>2021-02-17 13:47:18 -0500
commitc7dabc99eed50fa20cdcafd7c0175ab615da3d50 (patch)
treeec2c611c627827bbdd61d3e27400ae1b9a50d459 /cli/lsp/diagnostics.rs
parentf6d6b24506410816833d802e1a8d9cd704f73289 (diff)
Make ModuleSpecifier a type alias, not wrapper struct (#9531)
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 1237ff7a3..8017d7e28 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -248,7 +248,7 @@ pub async fn generate_ts_diagnostics(
let res = ts_server.request(state_snapshot.clone(), req).await?;
let ts_diagnostic_map: TsDiagnostics = serde_json::from_value(res)?;
for (specifier_str, ts_diagnostics) in ts_diagnostic_map.iter() {
- let specifier = ModuleSpecifier::resolve_url(specifier_str)?;
+ let specifier = deno_core::resolve_url(specifier_str)?;
let version = state_snapshot.documents.version(&specifier);
diagnostics.push((
specifier,
@@ -295,7 +295,7 @@ pub async fn generate_dependency_diagnostics(
}
ResolvedDependency::Resolved(specifier) => {
if !(state_snapshot.documents.contains_key(&specifier) || sources.contains_key(&specifier)) {
- let is_local = specifier.as_url().scheme() == "file";
+ let is_local = specifier.scheme() == "file";
let (code, message) = if is_local {
(Some(lsp::NumberOrString::String("no-local".to_string())), format!("Unable to load a local module: \"{}\".\n Please check the file path.", specifier))
} else {