Unnamed repository; edit this file 'description' to name the repository.
nit: move an allocation to happen after a `continue`, making sure it's
not done for nothing
Alexis (Poliorcetics) Bourget 2022-10-21
parent 5a84834 · commit 3aea33a
-rw-r--r--helix-term/src/application.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 8ee0802f..173c5d49 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -597,14 +597,14 @@ impl Application {
// trigger textDocument/didOpen for docs that are already open
for doc in docs {
- let language_id =
- doc.language_id().map(ToOwned::to_owned).unwrap_or_default();
-
let url = match doc.url() {
Some(url) => url,
None => continue, // skip documents with no path
};
+ let language_id =
+ doc.language_id().map(ToOwned::to_owned).unwrap_or_default();
+
tokio::spawn(language_server.text_document_did_open(
url,
doc.version(),