mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 01:21:21 +00:00
refactor(core)!: remove EitherUpgrade
(#3339)
We don't need to define our own type here, we can simply implement `UpgradeInfo`, `InboundUpgrade` and `OutboundUpgrade` on `either::Either`.
This commit is contained in:
@ -355,7 +355,7 @@ impl IntoConnectionHandler for Prototype {
|
||||
}
|
||||
|
||||
fn inbound_protocol(&self) -> <Self::Handler as ConnectionHandler>::InboundProtocol {
|
||||
upgrade::EitherUpgrade::A(SendWrapper(inbound_hop::Upgrade {
|
||||
Either::Left(SendWrapper(inbound_hop::Upgrade {
|
||||
reservation_duration: self.config.reservation_duration,
|
||||
max_circuit_duration: self.config.max_circuit_duration,
|
||||
max_circuit_bytes: self.config.max_circuit_bytes,
|
||||
|
@ -155,7 +155,7 @@ impl IntoConnectionHandler for Prototype {
|
||||
}
|
||||
|
||||
fn inbound_protocol(&self) -> <Self::Handler as ConnectionHandler>::InboundProtocol {
|
||||
upgrade::EitherUpgrade::A(SendWrapper(inbound_stop::Upgrade {}))
|
||||
Either::Left(SendWrapper(inbound_stop::Upgrade {}))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user