From 3aea33a4152e8ad1018b7d7019b2d2fde971eea4 Mon Sep 17 00:00:00 2001 From: "Alexis (Poliorcetics) Bourget" Date: Sat, 15 Oct 2022 18:39:55 +0200 Subject: [PATCH] nit: move an allocation to happen after a `continue`, making sure it's not done for nothing --- helix-term/src/application.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 8ee0802f2..173c5d49a 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(),