From c69f3dfef161dfa7e8a4e2189b6acb0474736f86 Mon Sep 17 00:00:00 2001 From: Marek Kaput Date: Tue, 3 Dec 2024 14:49:41 +0100 Subject: [PATCH] Remove dependency on `rustc-hash` (#17) --- Cargo.lock | 1 - Cargo.toml | 1 - src/server/client.rs | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7f16f9a..b88a411 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -746,7 +746,6 @@ dependencies = [ "pathdiff", "pretty_assertions", "rust-analyzer-salsa", - "rustc-hash", "scarb-metadata", "scarb-proc-macro-server-types", "scarb-stable-hash", diff --git a/Cargo.toml b/Cargo.toml index 83ab476..70b219c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,6 @@ itertools = "0.12.1" jod-thread = "0.1.2" lsp-server = "0.7.7" lsp-types = "=0.95.0" -rustc-hash = "1.1.0" salsa = { package = "rust-analyzer-salsa", version = "0.17.0-pre.6" } scarb-metadata = "1.13" scarb-proc-macro-server-types = "0.1" diff --git a/src/server/client.rs b/src/server/client.rs index db799dd..9cd0f57 100644 --- a/src/server/client.rs +++ b/src/server/client.rs @@ -6,11 +6,11 @@ // +-----------------------------------------------------+ use std::any::TypeId; +use std::collections::HashMap; use anyhow::Result; use lsp_server::{Notification, RequestId, Response}; use lsp_types::notification::Notification as NotificationTrait; -use rustc_hash::FxHashMap; use serde_json::Value; use tracing::error; @@ -35,7 +35,7 @@ pub struct Responder(ClientSender); pub struct Requester<'s> { sender: ClientSender, next_request_id: i32, - response_handlers: FxHashMap>, + response_handlers: HashMap>, } impl Client<'_> { @@ -46,7 +46,7 @@ impl Client<'_> { requester: Requester { sender, next_request_id: 1, - response_handlers: FxHashMap::default(), + response_handlers: Default::default(), }, } }