Deduplicate some Inlay definitions

- Remove match conversion for InlayKind since we're using remote
This commit is contained in:
Steffen Lyngbaek
2020-03-10 18:59:49 -07:00
parent cfb48df149
commit 974ed7155a
3 changed files with 31 additions and 36 deletions

View File

@@ -37,7 +37,7 @@ use crate::{
},
diagnostics::DiagnosticTask,
from_json,
req::{self, Decoration, InlayHint, InlayHintsParams, InlayKind},
req::{self, Decoration, InlayHint, InlayHintsParams},
semantic_tokens::SemanticTokensBuilder,
world::WorldSnapshot,
LspError, Result,
@@ -1002,10 +1002,7 @@ pub fn handle_inlay_hints(
.map(|api_type| InlayHint {
label: api_type.label.to_string(),
range: api_type.range.conv_with(&line_index),
kind: match api_type.kind {
ra_ide::InlayKind::TypeHint => InlayKind::TypeHint,
ra_ide::InlayKind::ParameterHint => InlayKind::ParameterHint,
},
kind: api_type.kind,
})
.collect())
}