mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 07:47:57 +00:00
Update to Substrate master (#311)
* Best effort to bring up to date. * Fix the executor stuff * Update verisons. * Finish fixing * Final fixes and warnings. * add some docs and bump Wasm versions * Fix tests * Fix final test
This commit is contained in:
@@ -44,7 +44,6 @@ use std::io;
|
||||
use std::sync::Arc;
|
||||
|
||||
use arrayvec::ArrayVec;
|
||||
use tokio::runtime::TaskExecutor;
|
||||
use parking_lot::Mutex;
|
||||
use log::{debug, warn};
|
||||
|
||||
@@ -63,6 +62,7 @@ pub trait Executor {
|
||||
}
|
||||
|
||||
/// A wrapped futures::future::Executor.
|
||||
#[derive(Clone)]
|
||||
pub struct WrappedExecutor<T>(pub T);
|
||||
|
||||
impl<T> Executor for WrappedExecutor<T>
|
||||
@@ -75,9 +75,11 @@ impl<T> Executor for WrappedExecutor<T>
|
||||
}
|
||||
}
|
||||
|
||||
impl Executor for TaskExecutor {
|
||||
impl Executor for Arc<
|
||||
dyn futures::future::Executor<Box<dyn Future<Item = (), Error = ()> + Send>> + Send + Sync
|
||||
> {
|
||||
fn spawn<F: Future<Item=(),Error=()> + Send + 'static>(&self, f: F) {
|
||||
TaskExecutor::spawn(self, f)
|
||||
let _ = FutureExecutor::execute(&**self, Box::new(f));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user