Fix resolve status conversion

This commit is contained in:
Kirill Bulatov 2023-08-23 19:43:05 +03:00
parent bcaff0a18a
commit dcf570bb03
9 changed files with 71 additions and 72 deletions

View file

@ -1935,8 +1935,9 @@ impl InlayHints {
pub fn project_to_proto_hint(response_hint: InlayHint, cx: &AppContext) -> proto::InlayHint {
let (state, lsp_resolve_state) = match response_hint.resolve_state {
ResolveState::Resolved => (0, None),
ResolveState::CanResolve(server_id, resolve_data) => (
0,
1,
resolve_data
.map(|json_data| {
serde_json::to_string(&json_data)
@ -1947,7 +1948,6 @@ impl InlayHints {
value,
}),
),
ResolveState::Resolved => (1, None),
ResolveState::Resolving => (2, None),
};
let resolve_state = Some(proto::ResolveState {

View file

@ -5091,7 +5091,7 @@ impl Project {
InlayHints::proto_to_project_hint(resolved_hint, &project, &mut cx)
.await
.map(Some)
.context("inlay hints proto response conversion")
.context("inlay hints proto resolve response conversion")
}
None => Ok(None),
}