diff options
author | Kirill Bulatov <[email protected]> | 2020-07-27 13:53:57 +0100 |
---|---|---|
committer | Kirill Bulatov <[email protected]> | 2020-08-11 13:09:08 +0100 |
commit | 26e102a567aadcf86f2e5b575cb6b915991ba088 (patch) | |
tree | 2075de8433e6f99ee79849724cb402cf232d8426 /crates/rust-analyzer/src | |
parent | e0de2475208765a171f335dfffde764f96243d41 (diff) |
Separate diagnostics and diagnostics fix ranges
Diffstat (limited to 'crates/rust-analyzer/src')
-rw-r--r-- | crates/rust-analyzer/src/handlers.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index c2afcf192..144c641b2 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs | |||
@@ -775,9 +775,9 @@ fn handle_fixes( | |||
775 | 775 | ||
776 | let fixes_from_diagnostics = diagnostics | 776 | let fixes_from_diagnostics = diagnostics |
777 | .into_iter() | 777 | .into_iter() |
778 | .filter_map(|d| Some((d.range, d.fix?))) | 778 | .filter_map(|d| d.fix) |
779 | .filter(|(diag_range, _fix)| diag_range.intersect(range).is_some()) | 779 | .filter(|(_fix, fix_range)| fix_range.intersect(range).is_some()) |
780 | .map(|(_range, fix)| fix); | 780 | .map(|(fix, _range)| fix); |
781 | for fix in fixes_from_diagnostics { | 781 | for fix in fixes_from_diagnostics { |
782 | let title = fix.label; | 782 | let title = fix.label; |
783 | let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?; | 783 | let edit = to_proto::snippet_workspace_edit(&snap, fix.source_change)?; |