18
18
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
19
19
// DEALINGS IN THE SOFTWARE.
20
20
21
- #[ allow( deprecated) ]
22
- use crate :: connection:: ConnectionLimit ;
23
21
use crate :: transport:: TransportError ;
24
22
use crate :: Multiaddr ;
25
23
use crate :: { ConnectedPoint , PeerId } ;
@@ -90,15 +88,6 @@ pub enum PendingConnectionError<TTransErr> {
90
88
/// An error occurred while negotiating the transport protocol(s) on a connection.
91
89
Transport ( TTransErr ) ,
92
90
93
- /// The connection was dropped because the connection limit
94
- /// for a peer has been reached.
95
- #[ deprecated(
96
- note = "Use `libp2p::connection_limits` instead and handle `{Dial,Listen}Error::Denied::cause`." ,
97
- since = "0.42.1"
98
- ) ]
99
- #[ allow( deprecated) ]
100
- ConnectionLimit ( ConnectionLimit ) ,
101
-
102
91
/// Pending connection attempt has been aborted.
103
92
Aborted ,
104
93
@@ -117,10 +106,6 @@ impl<T> PendingConnectionError<T> {
117
106
pub fn map < U > ( self , f : impl FnOnce ( T ) -> U ) -> PendingConnectionError < U > {
118
107
match self {
119
108
PendingConnectionError :: Transport ( t) => PendingConnectionError :: Transport ( f ( t) ) ,
120
- #[ allow( deprecated) ]
121
- PendingConnectionError :: ConnectionLimit ( l) => {
122
- PendingConnectionError :: ConnectionLimit ( l)
123
- }
124
109
PendingConnectionError :: Aborted => PendingConnectionError :: Aborted ,
125
110
PendingConnectionError :: WrongPeerId { obtained, endpoint } => {
126
111
PendingConnectionError :: WrongPeerId { obtained, endpoint }
@@ -145,10 +130,6 @@ where
145
130
"Pending connection: Transport error on connection: {err}"
146
131
)
147
132
}
148
- #[ allow( deprecated) ]
149
- PendingConnectionError :: ConnectionLimit ( l) => {
150
- write ! ( f, "Connection error: Connection limit: {l}." )
151
- }
152
133
PendingConnectionError :: WrongPeerId { obtained, endpoint } => {
153
134
write ! (
154
135
f,
@@ -172,8 +153,6 @@ where
172
153
PendingConnectionError :: WrongPeerId { .. } => None ,
173
154
PendingConnectionError :: LocalPeerId { .. } => None ,
174
155
PendingConnectionError :: Aborted => None ,
175
- #[ allow( deprecated) ]
176
- PendingConnectionError :: ConnectionLimit ( ..) => None ,
177
156
}
178
157
}
179
158
}
0 commit comments