expose jsonrpc-core client (#672)

* expose jsonrpc-core client

* use shared reference to RpcClienT

* don't expose Arc<dyn RpcClientT>

* cargo fmt
This commit is contained in:
Web3 Philosopher
2022-10-04 09:56:51 +01:00
committed by GitHub
parent 6cfd3bb511
commit 81175b2dd9
5 changed files with 10 additions and 8 deletions
+2 -2
View File
@@ -31,8 +31,8 @@ use std::{
pub struct RpcClient(Arc<dyn RpcClientT>);
impl RpcClient {
pub(crate) fn new<R: RpcClientT>(client: R) -> Self {
RpcClient(Arc::new(client))
pub(crate) fn new<R: RpcClientT>(client: Arc<R>) -> Self {
RpcClient(client)
}
/// Make an RPC request, given a method name and some parameters.