Switch to stable futures (#1196)

* Switch to stable futures

* Remove from_fn

* Fix secio

* Fix core --lib tests
This commit is contained in:
Pierre Krieger
2019-09-16 11:08:44 +02:00
committed by GitHub
parent 8c119269d6
commit 170d2d268f
105 changed files with 3193 additions and 5594 deletions

View File

@ -20,10 +20,10 @@
use crate::rpc_proto;
use crate::topic::TopicHash;
use futures::prelude::*;
use libp2p_core::{InboundUpgrade, OutboundUpgrade, UpgradeInfo, PeerId, upgrade};
use protobuf::{ProtobufError, Message as ProtobufMessage};
use std::{error, fmt, io, iter};
use tokio_io::{AsyncRead, AsyncWrite};
/// Implementation of `ConnectionUpgrade` for the floodsub protocol.
#[derive(Debug, Clone, Default)]
@ -49,7 +49,7 @@ impl UpgradeInfo for FloodsubConfig {
impl<TSocket> InboundUpgrade<TSocket> for FloodsubConfig
where
TSocket: AsyncRead + AsyncWrite,
TSocket: AsyncRead + AsyncWrite + Unpin,
{
type Output = FloodsubRpc;
type Error = FloodsubDecodeError;
@ -164,7 +164,7 @@ impl UpgradeInfo for FloodsubRpc {
impl<TSocket> OutboundUpgrade<TSocket> for FloodsubRpc
where
TSocket: AsyncWrite + AsyncRead,
TSocket: AsyncWrite + AsyncRead + Unpin,
{
type Output = ();
type Error = io::Error;