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

@ -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>;