summaryrefslogtreecommitdiff
path: root/cli/lsp/diagnostics.rs
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2022-02-24 20:03:12 -0500
committerGitHub <noreply@github.com>2022-02-24 20:03:12 -0500
commit3b12afd0723b288feb7c8c53ac3938a17fd0e57c (patch)
tree8ac398efaef6e59e3ab2278f378706aa44b5641e /cli/lsp/diagnostics.rs
parentc59152e4000393ad122855c26198c1d942497c00 (diff)
chore: upgrade to Rust 1.59 (#13767)
Diffstat (limited to 'cli/lsp/diagnostics.rs')
-rw-r--r--cli/lsp/diagnostics.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs
index 39f7f1c48..8801af722 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -538,8 +538,7 @@ async fn generate_ts_diagnostics(
let version = snapshot
.documents
.get(&specifier)
- .map(|d| d.maybe_lsp_version())
- .flatten();
+ .and_then(|d| d.maybe_lsp_version());
// check if the specifier is enabled again just in case TS returns us
// diagnostics for a disabled specifier
let ts_diagnostics = if config.specifier_enabled(&specifier) {
@@ -555,8 +554,7 @@ async fn generate_ts_diagnostics(
let version = snapshot
.documents
.get(&specifier)
- .map(|d| d.maybe_lsp_version())
- .flatten();
+ .and_then(|d| d.maybe_lsp_version());
diagnostics_vec.push((specifier, version, Vec::new()));
}
Ok(diagnostics_vec)