nit: move an allocation to happen after a continue
, making sure it's
not done for nothing
This commit is contained in:
parent
5a848344a9
commit
3aea33a415
1 changed files with 3 additions and 3 deletions
|
@ -597,14 +597,14 @@ impl Application {
|
||||||
|
|
||||||
// trigger textDocument/didOpen for docs that are already open
|
// trigger textDocument/didOpen for docs that are already open
|
||||||
for doc in docs {
|
for doc in docs {
|
||||||
let language_id =
|
|
||||||
doc.language_id().map(ToOwned::to_owned).unwrap_or_default();
|
|
||||||
|
|
||||||
let url = match doc.url() {
|
let url = match doc.url() {
|
||||||
Some(url) => url,
|
Some(url) => url,
|
||||||
None => continue, // skip documents with no path
|
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(
|
tokio::spawn(language_server.text_document_did_open(
|
||||||
url,
|
url,
|
||||||
doc.version(),
|
doc.version(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue