From b4c0c7f79c4d09508adbb4dcb5aee72c9400efb2 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 4 Jul 2019 18:04:46 -0400 Subject: Symplify by using into() --- crates/ra_lsp_server/src/main_loop/handlers.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 846991f09..2e6052ba2 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, CodeActionOrCommand, CodeActionResponse, CodeLens, Command, Diagnostic, + CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, PrepareRenameResponse, Range, RenameParams, SymbolInformation, @@ -689,7 +689,7 @@ pub fn handle_code_action( edit: None, command: Some(command), }; - res.push(CodeActionOrCommand::CodeAction(action)); + res.push(action.into()); } for assist in assists { @@ -711,7 +711,7 @@ pub fn handle_code_action( edit: None, command: Some(command), }; - res.push(CodeActionOrCommand::CodeAction(action)); + res.push(action.into()); } Ok(Some(res)) -- cgit v1.2.3