Thomas Eizinger
d66c8271b5
refactor(core): remove EitherIter
...
`EitherIter` is an implementation detail and can be removed without breaking users.
Related: https://github.com/libp2p/rust-libp2p/pull/3746 .
Pull-Request: #3841 .
2023-04-27 13:04:16 +00:00
Thomas Eizinger
4b41f5a994
refactor(core)!: remove EitherOutput
( #3341 )
...
The trick with this one is to use `futures::Either` everywhere where we may wrap something that implements any of the `futures` traits. This includes the output of `EitherFuture` itself. We also need to implement `StreamMuxer` on `future::Either` because `StreamMuxer`s may be the the `Output` of `InboundUpgrade`.
2023-01-23 12:31:30 +00:00
Thomas Eizinger
73cbbe2967
refactor(core)!: remove EitherFuture2
( #3340 )
...
We can completely replace `EitherFuture2` with `EitherFuture`. `EitherFuture` itself cannot be removed for now because the `Future` implementation on `future::Either` forces both `Future`s to evaluate to the same type.
2023-01-18 10:17:18 +00:00
Thomas Eizinger
db2cd43826
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`.
2023-01-18 02:35:07 +00:00
Thomas Eizinger
f4fed3880b
refactor(core)!: remove EitherError
in favor of either::Either
( #3337 )
...
Defining our own `EitherError` type has no value now that `Either` provides the same implementation.
Related: https://github.com/libp2p/rust-libp2p/issues/3271
2023-01-17 23:05:59 +00:00
Max Inden
f701b24ec0
*: Format with rustfmt ( #2188 )
...
Co-authored-by: Thomas Eizinger <thomas@eizinger.io >
2021-08-11 13:12:12 +02:00
Pierre Krieger
42a45e2630
Remove Negotiated from upgrade traits ( #1388 )
...
* Remove Negotiated from upgrade traits
* Remove import
2020-01-13 14:34:43 +01:00
Pierre Krieger
d738f4158f
More work
2019-12-10 13:40:40 +01:00
Pierre Krieger
170d2d268f
Switch to stable futures ( #1196 )
...
* Switch to stable futures
* Remove from_fn
* Fix secio
* Fix core --lib tests
2019-09-16 11:08:44 +02:00
Pierre Krieger
96e559b503
Wrap multistream-select streams under a Negotiated ( #1001 )
2019-03-19 17:27:30 +01:00
Toralf Wittner
a152e18821
Simplify handling of upgrade information. ( #761 )
2018-12-11 15:13:10 +01:00
Toralf Wittner
938b91742f
Add EitherUpgrade
and generalise OrUpgrade
. ( #662 )
2018-11-20 15:09:59 +01:00