@@ -61,18 +61,13 @@ mod apply;
61
61
mod denied;
62
62
mod either;
63
63
mod error;
64
- mod from_fn;
65
- mod map;
66
- mod optional;
67
64
mod pending;
68
65
mod ready;
69
66
mod select;
70
67
mod transfer;
71
68
72
69
use futures:: future:: Future ;
73
70
74
- #[ allow( deprecated) ]
75
- pub use self :: from_fn:: { from_fn, FromFnUpgrade } ;
76
71
pub use self :: {
77
72
apply:: { apply, apply_inbound, apply_outbound, InboundUpgradeApply , OutboundUpgradeApply } ,
78
73
denied:: DeniedUpgrade ,
@@ -83,11 +78,7 @@ pub use self::{
83
78
transfer:: { read_length_prefixed, read_varint, write_length_prefixed, write_varint} ,
84
79
} ;
85
80
pub use crate :: Negotiated ;
86
- #[ allow( deprecated) ]
87
- pub use map:: { MapInboundUpgrade , MapInboundUpgradeErr , MapOutboundUpgrade , MapOutboundUpgradeErr } ;
88
81
pub use multistream_select:: { NegotiatedComplete , NegotiationError , ProtocolError , Version } ;
89
- #[ allow( deprecated) ]
90
- pub use optional:: OptionalUpgrade ;
91
82
92
83
/// Types serving as protocol names.
93
84
///
@@ -164,35 +155,6 @@ pub trait InboundUpgrade<C>: UpgradeInfo {
164
155
fn upgrade_inbound ( self , socket : C , info : Self :: Info ) -> Self :: Future ;
165
156
}
166
157
167
- /// Extension trait for `InboundUpgrade`. Automatically implemented on all types that implement
168
- /// `InboundUpgrade`.
169
- #[ deprecated(
170
- note = "Will be removed without replacement because it is not used within rust-libp2p."
171
- ) ]
172
- #[ allow( deprecated) ]
173
- pub trait InboundUpgradeExt < C > : InboundUpgrade < C > {
174
- /// Returns a new object that wraps around `Self` and applies a closure to the `Output`.
175
- fn map_inbound < F , T > ( self , f : F ) -> MapInboundUpgrade < Self , F >
176
- where
177
- Self : Sized ,
178
- F : FnOnce ( Self :: Output ) -> T ,
179
- {
180
- MapInboundUpgrade :: new ( self , f)
181
- }
182
-
183
- /// Returns a new object that wraps around `Self` and applies a closure to the `Error`.
184
- fn map_inbound_err < F , T > ( self , f : F ) -> MapInboundUpgradeErr < Self , F >
185
- where
186
- Self : Sized ,
187
- F : FnOnce ( Self :: Error ) -> T ,
188
- {
189
- MapInboundUpgradeErr :: new ( self , f)
190
- }
191
- }
192
-
193
- #[ allow( deprecated) ]
194
- impl < C , U : InboundUpgrade < C > > InboundUpgradeExt < C > for U { }
195
-
196
158
/// Possible upgrade on an outbound connection or substream.
197
159
pub trait OutboundUpgrade < C > : UpgradeInfo {
198
160
/// Output after the upgrade has been successfully negotiated and the handshake performed.
@@ -208,32 +170,3 @@ pub trait OutboundUpgrade<C>: UpgradeInfo {
208
170
/// The `info` is the identifier of the protocol, as produced by `protocol_info`.
209
171
fn upgrade_outbound ( self , socket : C , info : Self :: Info ) -> Self :: Future ;
210
172
}
211
-
212
- /// Extention trait for `OutboundUpgrade`. Automatically implemented on all types that implement
213
- /// `OutboundUpgrade`.
214
- #[ deprecated(
215
- note = "Will be removed without replacement because it is not used within rust-libp2p."
216
- ) ]
217
- #[ allow( deprecated) ]
218
- pub trait OutboundUpgradeExt < C > : OutboundUpgrade < C > {
219
- /// Returns a new object that wraps around `Self` and applies a closure to the `Output`.
220
- fn map_outbound < F , T > ( self , f : F ) -> MapOutboundUpgrade < Self , F >
221
- where
222
- Self : Sized ,
223
- F : FnOnce ( Self :: Output ) -> T ,
224
- {
225
- MapOutboundUpgrade :: new ( self , f)
226
- }
227
-
228
- /// Returns a new object that wraps around `Self` and applies a closure to the `Error`.
229
- fn map_outbound_err < F , T > ( self , f : F ) -> MapOutboundUpgradeErr < Self , F >
230
- where
231
- Self : Sized ,
232
- F : FnOnce ( Self :: Error ) -> T ,
233
- {
234
- MapOutboundUpgradeErr :: new ( self , f)
235
- }
236
- }
237
-
238
- #[ allow( deprecated) ]
239
- impl < C , U : OutboundUpgrade < C > > OutboundUpgradeExt < C > for U { }
0 commit comments