Skip to content

Commit

Permalink
nit: move an allocation to happen after a continue, making sure it's
Browse files Browse the repository at this point in the history
not done for nothing
  • Loading branch information
poliorcetics authored and the-mikedavis committed Oct 21, 2022
1 parent 5a84834 commit 3aea33a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helix-term/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 3aea33a

Please sign in to comment.