mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-13 18:11:22 +00:00
Remove Negotiated from upgrade traits (#1388)
* Remove Negotiated from upgrade traits * Remove import
This commit is contained in:
@ -31,6 +31,7 @@ use libp2p_core::{
|
||||
ConnectedPoint,
|
||||
PeerId,
|
||||
Multiaddr,
|
||||
Negotiated,
|
||||
either::EitherOutput,
|
||||
upgrade::{InboundUpgrade, OutboundUpgrade, DeniedUpgrade, EitherUpgrade}
|
||||
};
|
||||
@ -206,7 +207,7 @@ where
|
||||
|
||||
fn inject_fully_negotiated_inbound(
|
||||
&mut self,
|
||||
out: <Self::InboundProtocol as InboundUpgrade<Self::Substream>>::Output
|
||||
out: <Self::InboundProtocol as InboundUpgrade<Negotiated<Self::Substream>>>::Output
|
||||
) {
|
||||
let out = match out {
|
||||
EitherOutput::First(out) => out,
|
||||
@ -219,7 +220,7 @@ where
|
||||
|
||||
fn inject_fully_negotiated_outbound(
|
||||
&mut self,
|
||||
out: <Self::OutboundProtocol as OutboundUpgrade<Self::Substream>>::Output,
|
||||
out: <Self::OutboundProtocol as OutboundUpgrade<Negotiated<Self::Substream>>>::Output,
|
||||
info: Self::OutboundOpenInfo
|
||||
) {
|
||||
self.inner.as_mut().expect("Can't receive an outbound substream if disabled; QED")
|
||||
@ -231,7 +232,7 @@ where
|
||||
.inject_event(event)
|
||||
}
|
||||
|
||||
fn inject_dial_upgrade_error(&mut self, info: Self::OutboundOpenInfo, err: ProtocolsHandlerUpgrErr<<Self::OutboundProtocol as OutboundUpgrade<Self::Substream>>::Error>) {
|
||||
fn inject_dial_upgrade_error(&mut self, info: Self::OutboundOpenInfo, err: ProtocolsHandlerUpgrErr<<Self::OutboundProtocol as OutboundUpgrade<Negotiated<Self::Substream>>>::Error>) {
|
||||
self.inner.as_mut().expect("Can't receive an outbound substream if disabled; QED")
|
||||
.inject_dial_upgrade_error(info, err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user