mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Service various cleanups (#3238)
* Remove generic from sign() * Remove mandatory RuntimeGenesis trait req * Remove requirement from Configuration * Relax trait bounds of core/cli * Move method * The config field is no longer public * Remove Components from bounds of functions * Implement DerefMut for LightComponents * Implement Executor for Full/LightComponents * Fix bad merge * Fix forgotten config() * Fix build
This commit is contained in:
committed by
Gavin Wood
parent
fe18b4055d
commit
bafc7202ca
@@ -506,6 +506,16 @@ impl<Factory: ServiceFactory> Future for FullComponents<Factory> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Factory: ServiceFactory> Executor<Box<dyn Future<Item = (), Error = ()> + Send>>
|
||||
for FullComponents<Factory> {
|
||||
fn execute(
|
||||
&self,
|
||||
future: Box<dyn Future<Item = (), Error = ()> + Send>
|
||||
) -> Result<(), futures::future::ExecuteError<Box<dyn Future<Item = (), Error = ()> + Send>>> {
|
||||
self.service.execute(future)
|
||||
}
|
||||
}
|
||||
|
||||
impl<Factory: ServiceFactory> Components for FullComponents<Factory> {
|
||||
type Factory = Factory;
|
||||
type Executor = FullExecutor<Factory>;
|
||||
@@ -606,6 +616,12 @@ impl<Factory: ServiceFactory> Deref for LightComponents<Factory> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Factory: ServiceFactory> DerefMut for LightComponents<Factory> {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target {
|
||||
&mut self.service
|
||||
}
|
||||
}
|
||||
|
||||
impl<Factory: ServiceFactory> Future for LightComponents<Factory> {
|
||||
type Item = ();
|
||||
type Error = ();
|
||||
@@ -615,6 +631,16 @@ impl<Factory: ServiceFactory> Future for LightComponents<Factory> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<Factory: ServiceFactory> Executor<Box<dyn Future<Item = (), Error = ()> + Send>>
|
||||
for LightComponents<Factory> {
|
||||
fn execute(
|
||||
&self,
|
||||
future: Box<dyn Future<Item = (), Error = ()> + Send>
|
||||
) -> Result<(), futures::future::ExecuteError<Box<dyn Future<Item = (), Error = ()> + Send>>> {
|
||||
self.service.execute(future)
|
||||
}
|
||||
}
|
||||
|
||||
impl<Factory: ServiceFactory> Components for LightComponents<Factory> {
|
||||
type Factory = Factory;
|
||||
type Executor = LightExecutor<Factory>;
|
||||
|
||||
Reference in New Issue
Block a user