aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorAlexis (Poliorcetics) Bourget2022-10-15 16:39:55 +0000
committerMichael Davis2022-10-21 12:42:33 +0000
commit3aea33a4152e8ad1018b7d7019b2d2fde971eea4 (patch)
tree989c138146b4184a04b516b5fbae0d64037ec7f7 /helix-term/src
parent5a848344a9b6f476922ea004e6a7f5b6d32ef768 (diff)
nit: move an allocation to happen after a `continue`, making sure it's
not done for nothing
Diffstat (limited to 'helix-term/src')
-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(),