From 9bfdab7089429bd6f43d1e2683598d40eb476c2a Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 4 Jul 2019 14:57:14 -0400 Subject: Update to lsp-types 0.58.0 --- crates/ra_lsp_server/src/main_loop/handlers.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_lsp_server/src/main_loop') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index bbbc93b1c..aea94ad0d 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -2,7 +2,7 @@ use std::{fmt::Write as _, io::Write as _}; use gen_lsp_server::ErrorCode; use lsp_types::{ - CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, + CodeAction, CodeActionOrCommand, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, PrepareRenameResponse, Range, RenameParams, SymbolInformation, TextDocumentIdentifier, @@ -665,7 +665,7 @@ pub fn handle_code_action( let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter(); let diagnostics = world.analysis().diagnostics(file_id)?; - let mut res: Vec = Vec::new(); + let mut res: CodeActionResponse = Default::default(); let fixes_from_diagnostics = diagnostics .into_iter() @@ -689,7 +689,7 @@ pub fn handle_code_action( edit: None, command: Some(command), }; - res.push(action); + res.push(CodeActionOrCommand::CodeAction(action)); } for assist in assists { @@ -711,10 +711,10 @@ pub fn handle_code_action( edit: None, command: Some(command), }; - res.push(action); + res.push(CodeActionOrCommand::CodeAction(action)); } - Ok(Some(CodeActionResponse::Actions(res))) + Ok(Some(res)) } pub fn handle_code_lens( -- cgit v1.2.3