Skip to content

Commit

Permalink
fix grumbles: impl for Box<T> and Arc<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasad1 committed Nov 21, 2023
1 parent 296320e commit 1c723b0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion subxt/src/backend/rpc/jsonrpsee_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,26 @@ impl RpcClientT for Client {
}
}

impl RpcClientT for std::sync::Arc<Client> {
impl<T: RpcClientT> RpcClientT for std::sync::Arc<T> {
fn request_raw<'a>(
&'a self,
method: &'a str,
params: Option<Box<RawValue>>,
) -> RawRpcFuture<'a, Box<RawValue>> {
(**self).request_raw(method, params)
}

fn subscribe_raw<'a>(
&'a self,
sub: &'a str,
params: Option<Box<RawValue>>,
unsub: &'a str,
) -> RawRpcFuture<'a, RawRpcSubscription> {
(**self).subscribe_raw(sub, params, unsub)
}
}

impl<T: RpcClientT> RpcClientT for Box<T> {
fn request_raw<'a>(
&'a self,
method: &'a str,
Expand Down

0 comments on commit 1c723b0

Please sign in to comment.