aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
authorPhilipp Mildenberger2023-04-05 16:56:19 +0000
committerPhilipp Mildenberger2023-05-18 20:04:49 +0000
commit2b746ea6fa6f7040e3ea51e1386bb914333594f4 (patch)
tree98d785641687ce929adee8ed304c210cbb9b8b0e /helix-view/src
parent39b9a4bba2a026844348886c9d9f2026a3d6f658 (diff)
Some minor clarity/cosmetic improvements
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/editor.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index afb8d91f..280002bd 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -1136,8 +1136,9 @@ impl Editor {
let doc_language_servers_not_in_registry =
doc.language_servers.iter().filter(|(name, doc_ls)| {
- !language_servers.contains_key(*name)
- || language_servers[*name].id() != doc_ls.id()
+ language_servers
+ .get(*name)
+ .map_or(true, |ls| ls.id() != doc_ls.id())
});
for (_, language_server) in doc_language_servers_not_in_registry {
@@ -1145,8 +1146,9 @@ impl Editor {
}
let language_servers_not_in_doc = language_servers.iter().filter(|(name, ls)| {
- !doc.language_servers.contains_key(*name)
- || doc.language_servers[*name].id() != ls.id()
+ doc.language_servers
+ .get(*name)
+ .map_or(true, |doc_ls| ls.id() != doc_ls.id())
});
for (_, language_server) in language_servers_not_in_doc {