mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 22:35:43 +00:00
Make EventSubscription and FilterEvents Send-able (#471)
* Make EventSubscription and FilterEvents Send-able * Cargo fmt * clippy * Remove unused import
This commit is contained in:
+4
-7
@@ -31,15 +31,12 @@ use crate::{
|
||||
storage::StorageKeyPrefix,
|
||||
Config,
|
||||
Metadata,
|
||||
PhantomDataSendSync,
|
||||
};
|
||||
use codec::{
|
||||
Decode,
|
||||
Encode,
|
||||
};
|
||||
use core::{
|
||||
convert::TryInto,
|
||||
marker::PhantomData,
|
||||
};
|
||||
use frame_metadata::RuntimeMetadataPrefixed;
|
||||
pub use jsonrpsee::{
|
||||
client_transport::ws::{
|
||||
@@ -211,14 +208,14 @@ pub struct ReadProof<Hash> {
|
||||
pub struct Rpc<T: Config> {
|
||||
/// Rpc client for sending requests.
|
||||
pub client: Arc<RpcClient>,
|
||||
marker: PhantomData<T>,
|
||||
_marker: PhantomDataSendSync<T>,
|
||||
}
|
||||
|
||||
impl<T: Config> Clone for Rpc<T> {
|
||||
fn clone(&self) -> Self {
|
||||
Self {
|
||||
client: self.client.clone(),
|
||||
marker: PhantomData,
|
||||
_marker: PhantomDataSendSync::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -228,7 +225,7 @@ impl<T: Config> Rpc<T> {
|
||||
pub fn new(client: RpcClient) -> Self {
|
||||
Self {
|
||||
client: Arc::new(client),
|
||||
marker: PhantomData,
|
||||
_marker: PhantomDataSendSync::new(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user