mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-27 00:31:35 +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:
@ -19,10 +19,10 @@
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
use crate::{
|
||||
Negotiated,
|
||||
either::{EitherOutput, EitherError, EitherFuture2, EitherName},
|
||||
upgrade::{InboundUpgrade, OutboundUpgrade, UpgradeInfo}
|
||||
};
|
||||
use multistream_select::Negotiated;
|
||||
|
||||
/// A type to represent two possible upgrade types (inbound or outbound).
|
||||
#[derive(Debug, Clone)]
|
||||
@ -50,7 +50,9 @@ where
|
||||
impl<C, A, B, TA, TB, EA, EB> InboundUpgrade<C> for EitherUpgrade<A, B>
|
||||
where
|
||||
A: InboundUpgrade<C, Output = TA, Error = EA>,
|
||||
<A as InboundUpgrade<C>>::Future: Unpin,
|
||||
B: InboundUpgrade<C, Output = TB, Error = EB>,
|
||||
<B as InboundUpgrade<C>>::Future: Unpin,
|
||||
{
|
||||
type Output = EitherOutput<TA, TB>;
|
||||
type Error = EitherError<EA, EB>;
|
||||
@ -68,7 +70,9 @@ where
|
||||
impl<C, A, B, TA, TB, EA, EB> OutboundUpgrade<C> for EitherUpgrade<A, B>
|
||||
where
|
||||
A: OutboundUpgrade<C, Output = TA, Error = EA>,
|
||||
<A as OutboundUpgrade<C>>::Future: Unpin,
|
||||
B: OutboundUpgrade<C, Output = TB, Error = EB>,
|
||||
<B as OutboundUpgrade<C>>::Future: Unpin,
|
||||
{
|
||||
type Output = EitherOutput<TA, TB>;
|
||||
type Error = EitherError<EA, EB>;
|
||||
|
Reference in New Issue
Block a user