nit: move an allocation to happen after a `continue`, making sure it's

not done for nothing
pull/4406/head
Alexis (Poliorcetics) Bourget 2022-10-15 18:39:55 +02:00 committed by Michael Davis
parent 5a848344a9
commit 3aea33a415
1 changed files with 3 additions and 3 deletions

View File

@ -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(),