Make LspAdapter::process_diagnostics synchronous
Co-authored-by: Nathan <nathan@zed.dev>
This commit is contained in:
parent
e3a4d174de
commit
4e33654aba
3 changed files with 19 additions and 28 deletions
|
@ -102,7 +102,7 @@ impl LspAdapter for RustLspAdapter {
|
|||
Some("rust-analyzer/flycheck".into())
|
||||
}
|
||||
|
||||
async fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {
|
||||
fn process_diagnostics(&self, params: &mut lsp::PublishDiagnosticsParams) {
|
||||
lazy_static! {
|
||||
static ref REGEX: Regex = Regex::new("(?m)`([^`]+)\n`$").unwrap();
|
||||
}
|
||||
|
@ -310,7 +310,7 @@ mod tests {
|
|||
},
|
||||
],
|
||||
};
|
||||
RustLspAdapter.process_diagnostics(&mut params).await;
|
||||
RustLspAdapter.process_diagnostics(&mut params);
|
||||
|
||||
assert_eq!(params.diagnostics[0].message, "use of moved value `a`");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue