Skip to content

Commit 21f70a7

Browse files
bors[bot]kjeremy
andcommitted
Merge #1488
1488: Symplify by using into() r=kjeremy a=kjeremy Co-authored-by: Jeremy Kolb <kjeremy@gmail.com>
2 parents 0ab5b11 + 9438bbc commit 21f70a7

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/ra_lsp_server/src/main_loop/handlers.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ use std::{fmt::Write as _, io::Write as _};
22

33
use gen_lsp_server::ErrorCode;
44
use lsp_types::{
5-
CodeAction, CodeActionOrCommand, CodeActionResponse, CodeLens, Command, Diagnostic,
6-
DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange,
7-
FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent,
8-
MarkupKind, Position, PrepareRenameResponse, Range, RenameParams, SymbolInformation,
9-
TextDocumentIdentifier, TextEdit, WorkspaceEdit,
5+
CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic, DiagnosticSeverity,
6+
DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange, FoldingRangeKind,
7+
FoldingRangeParams, Hover, HoverContents, Location, MarkupContent, MarkupKind, Position,
8+
PrepareRenameResponse, Range, RenameParams, SymbolInformation, TextDocumentIdentifier,
9+
TextEdit, WorkspaceEdit,
1010
};
1111
use ra_ide_api::{
1212
AssistId, Cancelable, FileId, FilePosition, FileRange, FoldKind, Query, RangeInfo,
@@ -689,7 +689,7 @@ pub fn handle_code_action(
689689
edit: None,
690690
command: Some(command),
691691
};
692-
res.push(CodeActionOrCommand::CodeAction(action));
692+
res.push(action.into());
693693
}
694694

695695
for assist in assists {
@@ -711,7 +711,7 @@ pub fn handle_code_action(
711711
edit: None,
712712
command: Some(command),
713713
};
714-
res.push(CodeActionOrCommand::CodeAction(action));
714+
res.push(action.into());
715715
}
716716

717717
Ok(Some(res))

0 commit comments

Comments
 (0)