Make simple_request::Client generic to the executor

Part of https://github.com/serai-dex/serai/issues/682.

We don't remove the use of `tokio::sync::Mutex` now as `hyper` pulls in
`tokio::sync` anyways, so there's no point in replacing it. This doesn't yet
solve TLS for non-`tokio` `Client`s.
This commit is contained in:
Luke Parker
2025-09-30 00:11:35 -04:00
parent f27fd59fa6
commit 4fc7263ac3
16 changed files with 129 additions and 81 deletions

View File

@@ -19,7 +19,7 @@ workspace = true
tower = "0.5"
serde_json = { version = "1", default-features = false }
simple-request = { path = "../../../common/request", version = "0.2", default-features = false }
simple-request = { path = "../../../common/request", version = "0.3", default-features = false, features = ["tokio"] }
alloy-json-rpc = { version = "1", default-features = false }
alloy-transport = { version = "1", default-features = false }

View File

@@ -7,7 +7,7 @@ use std::io;
use alloy_json_rpc::{RequestPacket, ResponsePacket};
use alloy_transport::{TransportError, TransportErrorKind, TransportFut};
use simple_request::{hyper, Error, Request, Client};
use simple_request::{hyper, Error, Request, TokioClient as Client};
use tower::Service;