mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 08:47:57 +00:00
Upgrade from futures-preview to futures 0.3.1, and remove futures 0.1 where currently possible (#4083)
* Migrate node and node-template * Migrate srml * Simple changes * Add async-std for interval * Fix test-runtime warning * Small changes * move futures01 in core/rpc to dev-deps * Change wasm CI builds * Switch to async-std 1.0.1 * Remove async-std dep of network * Add modified lockfile * Fix node cli browser build * Remove authority-discovery async-std dep * Add Send + Sync to interval dyn stream
This commit is contained in:
@@ -18,8 +18,8 @@
|
||||
|
||||
#![warn(missing_docs)]
|
||||
|
||||
use futures::sync::oneshot;
|
||||
use futures::{future, Future};
|
||||
use futures::channel::oneshot;
|
||||
use futures::{future, FutureExt};
|
||||
use substrate_cli::VersionInfo;
|
||||
|
||||
use std::cell::RefCell;
|
||||
@@ -27,7 +27,7 @@ use std::cell::RefCell;
|
||||
// handles ctrl-c
|
||||
struct Exit;
|
||||
impl substrate_cli::IntoExit for Exit {
|
||||
type Exit = future::MapErr<oneshot::Receiver<()>, fn(oneshot::Canceled) -> ()>;
|
||||
type Exit = future::Map<oneshot::Receiver<()>, fn(Result<(), oneshot::Canceled>) -> ()>;
|
||||
fn into_exit(self) -> Self::Exit {
|
||||
// can't use signal directly here because CtrlC takes only `Fn`.
|
||||
let (exit_send, exit) = oneshot::channel();
|
||||
@@ -39,7 +39,7 @@ impl substrate_cli::IntoExit for Exit {
|
||||
}
|
||||
}).expect("Error setting Ctrl-C handler");
|
||||
|
||||
exit.map_err(drop)
|
||||
exit.map(|_| ())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user