Skip to content

Commit b4c0c7f

Browse files
committed
Symplify by using into()
1 parent 0ab5b11 commit b4c0c7f

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ 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,
5+
CodeAction, CodeActionResponse, CodeLens, Command, Diagnostic,
66
DiagnosticSeverity, DocumentFormattingParams, DocumentHighlight, DocumentSymbol, FoldingRange,
77
FoldingRangeKind, FoldingRangeParams, Hover, HoverContents, Location, MarkupContent,
88
MarkupKind, Position, PrepareRenameResponse, Range, RenameParams, SymbolInformation,
@@ -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)