mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-24 07:11:38 +00:00
Switch to stable futures (#1196)
* Switch to stable futures * Remove from_fn * Fix secio * Fix core --lib tests
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user