Use proper inlay kinds

This commit is contained in:
Kirill Bulatov 2019-08-05 00:28:36 +03:00
parent 2c02aebeb5
commit 15411d4474
3 changed files with 15 additions and 43 deletions

View file

@ -894,14 +894,7 @@ pub fn handle_inlay_hints(
label: api_type.label.to_string(),
range: api_type.range.conv_with(&line_index),
kind: match api_type.kind {
ra_ide_api::InlayKind::LetBindingType => InlayKind::LetBindingType,
ra_ide_api::InlayKind::ClosureParameterType => InlayKind::ClosureParameterType,
ra_ide_api::InlayKind::ForExpressionBindingType => {
InlayKind::ForExpressionBindingType
}
ra_ide_api::InlayKind::IfExpressionType => InlayKind::IfExpressionType,
ra_ide_api::InlayKind::WhileLetExpressionType => InlayKind::WhileLetExpressionType,
ra_ide_api::InlayKind::MatchArmType => InlayKind::MatchArmType,
ra_ide_api::InlayKind::TypeHint => InlayKind::TypeHint,
},
})
.collect())

View file

@ -213,12 +213,7 @@ pub struct InlayHintsParams {
#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)]
pub enum InlayKind {
LetBindingType,
ClosureParameterType,
ForExpressionBindingType,
IfExpressionType,
WhileLetExpressionType,
MatchArmType,
TypeHint,
}
#[derive(Debug, Deserialize, Serialize)]