diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-04 23:14:46 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-04 23:14:46 +0100 |
commit | 5deb907b4321d8328978d3322b0826b781814452 (patch) | |
tree | 2baa3b75b1ef62c02617c37ba9b800c41a3dd102 /crates/ra_lsp_server/src/main_loop.rs | |
parent | 8bd0e844247dc28d6ceb24b00f3cc3396bd5bf03 (diff) | |
parent | aa30c4909ebb1e85f1591f465c9e2875aa4d394e (diff) |
Merge #1374
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu
This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go.
cc #848
Co-authored-by: Alan Du <[email protected]>
Diffstat (limited to 'crates/ra_lsp_server/src/main_loop.rs')
-rw-r--r-- | crates/ra_lsp_server/src/main_loop.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 6080a3a4e..090fb9b1b 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs | |||
@@ -384,7 +384,7 @@ fn on_notification( | |||
384 | if let Some(file_id) = | 384 | if let Some(file_id) = |
385 | state.vfs.write().add_file_overlay(&path, params.text_document.text) | 385 | state.vfs.write().add_file_overlay(&path, params.text_document.text) |
386 | { | 386 | { |
387 | subs.add_sub(FileId(file_id.0.into())); | 387 | subs.add_sub(FileId(file_id.0)); |
388 | } | 388 | } |
389 | return Ok(()); | 389 | return Ok(()); |
390 | } | 390 | } |
@@ -406,7 +406,7 @@ fn on_notification( | |||
406 | let uri = params.text_document.uri; | 406 | let uri = params.text_document.uri; |
407 | let path = uri.to_file_path().map_err(|()| format_err!("invalid uri: {}", uri))?; | 407 | let path = uri.to_file_path().map_err(|()| format_err!("invalid uri: {}", uri))?; |
408 | if let Some(file_id) = state.vfs.write().remove_file_overlay(path.as_path()) { | 408 | if let Some(file_id) = state.vfs.write().remove_file_overlay(path.as_path()) { |
409 | subs.remove_sub(FileId(file_id.0.into())); | 409 | subs.remove_sub(FileId(file_id.0)); |
410 | } | 410 | } |
411 | let params = req::PublishDiagnosticsParams { uri, diagnostics: Vec::new() }; | 411 | let params = req::PublishDiagnosticsParams { uri, diagnostics: Vec::new() }; |
412 | let not = RawNotification::new::<req::PublishDiagnostics>(¶ms); | 412 | let not = RawNotification::new::<req::PublishDiagnostics>(¶ms); |