mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 23:21:02 +00:00
Implement Clone for the generated RuntimeApi (#544)
* Implement Clone for the generated `RuntimeApi` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Don't reexport Derivative Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Implement `Clone` manually Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Update `polkadot.rs` Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -296,6 +296,12 @@ impl RuntimeGenerator {
|
|||||||
marker: ::core::marker::PhantomData<X>,
|
marker: ::core::marker::PhantomData<X>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T: ::subxt::Config, X> Clone for RuntimeApi<T, X> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self { client: self.client.clone(), marker: ::core::marker::PhantomData }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T, X> ::core::convert::From<::subxt::Client<T>> for RuntimeApi<T, X>
|
impl<T, X> ::core::convert::From<::subxt::Client<T>> for RuntimeApi<T, X>
|
||||||
where
|
where
|
||||||
T: ::subxt::Config,
|
T: ::subxt::Config,
|
||||||
|
|||||||
@@ -50126,6 +50126,14 @@ pub mod api {
|
|||||||
pub client: ::subxt::Client<T>,
|
pub client: ::subxt::Client<T>,
|
||||||
marker: ::core::marker::PhantomData<X>,
|
marker: ::core::marker::PhantomData<X>,
|
||||||
}
|
}
|
||||||
|
impl<T: ::subxt::Config, X> Clone for RuntimeApi<T, X> {
|
||||||
|
fn clone(&self) -> Self {
|
||||||
|
Self {
|
||||||
|
client: self.client.clone(),
|
||||||
|
marker: ::core::marker::PhantomData,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
impl<T, X> ::core::convert::From<::subxt::Client<T>> for RuntimeApi<T, X>
|
impl<T, X> ::core::convert::From<::subxt::Client<T>> for RuntimeApi<T, X>
|
||||||
where
|
where
|
||||||
T: ::subxt::Config,
|
T: ::subxt::Config,
|
||||||
|
|||||||
Reference in New Issue
Block a user