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/ra_lsp_server/src') 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 From 9438bbc75a6c8e2b0d9b13a9455807300c8a6c6a Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Thu, 4 Jul 2019 19:31:06 -0400 Subject: Formatting again --- crates/ra_lsp_server/src/main_loop/handlers.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/ra_lsp_server/src') diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs index 2e6052ba2..a8d6f7c23 100644 --- a/crates/ra_lsp_server/src/main_loop/handlers.rs +++ b/crates/ra_lsp_server/src/main_loop/handlers.rs @@ -2,11 +2,11 @@ use std::{fmt::Write as _, io::Write as _}; use gen_lsp_server::ErrorCode; use lsp_types::{ - CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, - DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, - FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, - MarkupKind, Position, PrepareRenameResponse, Range, RenameParams, SymbolInformation, - TextDocumentIdentifier, TextEdit, WorkspaceEdit, + CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity, + DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind, + FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position, + PrepareRenameResponse, Range, RenameParams, SymbolInformation, TextDocumentIdentifier, + TextEdit, WorkspaceEdit, }; use ra_ide_api::{ AssistId, Cancelable, FileId, FilePosition, FileRange, FoldKind, Query, RangeInfo, -- cgit v1.2.3