diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index f770f4a233..01b3a2df6c 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -296,6 +296,12 @@ impl RuntimeGenerator { marker: ::core::marker::PhantomData, } + impl Clone for RuntimeApi { + fn clone(&self) -> Self { + Self { client: self.client.clone(), marker: ::core::marker::PhantomData } + } + } + impl ::core::convert::From<::subxt::Client> for RuntimeApi where T: ::subxt::Config, diff --git a/integration-tests/src/codegen/polkadot.rs b/integration-tests/src/codegen/polkadot.rs index 3ca134c6e9..d4dacbc6dc 100644 --- a/integration-tests/src/codegen/polkadot.rs +++ b/integration-tests/src/codegen/polkadot.rs @@ -50126,6 +50126,14 @@ pub mod api { pub client: ::subxt::Client, marker: ::core::marker::PhantomData, } + impl Clone for RuntimeApi { + fn clone(&self) -> Self { + Self { + client: self.client.clone(), + marker: ::core::marker::PhantomData, + } + } + } impl ::core::convert::From<::subxt::Client> for RuntimeApi where T: ::subxt::Config,