Skip to content
This repository was archived by the owner on Jan 6, 2025. It is now read-only.

Commit 5add331

Browse files
committed
Don't insert request ids into the map if we get a request
.. as it's only required when we're client side and have to remember which method we called.
1 parent 4b8e4d4 commit 5add331

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/lsps0/msgs.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,14 +389,10 @@ impl<'de, 'a> Visitor<'de> for LSPSMessageVisitor<'a> {
389389

390390
match method {
391391
Some(method) => match method {
392-
LSPS0_LISTPROTOCOLS_METHOD_NAME => {
393-
self.request_id_to_method_map.insert(id.clone(), method.to_string());
394-
395-
Ok(LSPSMessage::LSPS0(LSPS0Message::Request(
396-
RequestId(id),
397-
LSPS0Request::ListProtocols(ListProtocolsRequest {}),
398-
)))
399-
}
392+
LSPS0_LISTPROTOCOLS_METHOD_NAME => Ok(LSPSMessage::LSPS0(LSPS0Message::Request(
393+
RequestId(id),
394+
LSPS0Request::ListProtocols(ListProtocolsRequest {}),
395+
))),
400396
#[cfg(lsps1)]
401397
LSPS1_GET_INFO_METHOD_NAME => {
402398
let request = serde_json::from_value(params.unwrap_or(json!({})))

0 commit comments

Comments
 (0)