Skip to content

Commit cacfb59

Browse files
authored
chore(dcutr): remove deprecated items
Removes deprecated items from `libp2p-dcutr`. Related #3647 Pull-Request: #3700.
1 parent 3e5f643 commit cacfb59

File tree

5 files changed

+4
-30
lines changed

5 files changed

+4
-30
lines changed

libp2p/src/tutorials/hole_punching.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,15 @@
168168
//!
169169
//! 2. The listening client initiating a direct connection upgrade for the new relayed connection.
170170
//! Reported by [`dcutr`](crate::dcutr) through
171-
//! [`Event::RemoteInitiatedDirectConnectionUpgrade`](crate::dcutr::behaviour::Event::RemoteInitiatedDirectConnectionUpgrade).
171+
//! [`Event::RemoteInitiatedDirectConnectionUpgrade`](crate::dcutr::Event::RemoteInitiatedDirectConnectionUpgrade).
172172
//!
173173
//! ``` ignore
174174
//! [2022-01-30T12:54:11Z INFO client] RemoteInitiatedDirectConnectionUpgrade { remote_peer_id: PeerId("12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X"), remote_relayed_addr: "/ip4/$RELAY_PEER_ID/tcp/4001/p2p/12D3KooWDpJ7As7BWAwRMfu1VU2WCqNjvq387JEYKDBj4kx6nXTN/p2p-circuit/p2p/12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X" }
175175
//! ```
176176
//!
177177
//! 3. The direct connection upgrade, also known as hole punch, succeeding. Reported by
178178
//! [`dcutr`](crate::dcutr) through
179-
//! [`Event::RemoteInitiatedDirectConnectionUpgrade`](crate::dcutr::behaviour::Event::DirectConnectionUpgradeSucceeded).
179+
//! [`Event::RemoteInitiatedDirectConnectionUpgrade`](crate::dcutr::Event::DirectConnectionUpgradeSucceeded).
180180
//!
181181
//! ``` ignore
182182
//! [2022-01-30T12:54:11Z INFO client] DirectConnectionUpgradeSucceeded { remote_peer_id: PeerId("12D3KooWPjceQrSwdWXPyLLeABRXmuqt69Rg3sBYbU1Nft9HyQ6X") }

protocols/dcutr/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
- Raise MSRV to 1.65.
44
See [PR 3715].
5+
- Remove deprecated items. See [PR 3700].
56

67
[PR 3715]: https://github.com/libp2p/rust-libp2p/pull/3715
8+
[PR 3700]: https://github.com/libp2p/rust-libp2p/pull/3700
79

810
## 0.9.1
911

protocols/dcutr/src/lib.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,3 @@ pub mod inbound {
4343
pub mod outbound {
4444
pub use crate::protocol::outbound::UpgradeError;
4545
}
46-
47-
#[deprecated(
48-
since = "0.9.0",
49-
note = "Use `libp2p_dcutr::inbound::UpgradeError` instead.`"
50-
)]
51-
pub type InboundUpgradeError = inbound::UpgradeError;
52-
53-
#[deprecated(
54-
since = "0.9.0",
55-
note = "Use `libp2p_dcutr::outbound::UpgradeError` instead.`"
56-
)]
57-
pub type OutboundUpgradeError = outbound::UpgradeError;
58-
pub mod behaviour {
59-
#[deprecated(since = "0.9.0", note = "Use `libp2p_dcutr::Behaviour` instead.`")]
60-
pub type Behaviour = crate::Behaviour;
61-
62-
#[deprecated(since = "0.9.0", note = "Use `libp2p_dcutr::Event` instead.`")]
63-
pub type Event = crate::Event;
64-
65-
#[deprecated(since = "0.9.0", note = "Use `libp2p_dcutr::Error` instead.`")]
66-
pub type UpgradeError = crate::Error;
67-
}

protocols/dcutr/src/protocol/inbound.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ pub enum UpgradeError {
130130
StreamClosed,
131131
#[error("Expected at least one address in reservation.")]
132132
NoAddresses,
133-
#[deprecated(since = "0.8.1", note = "Error is no longer constructed.")]
134-
#[error("Invalid addresses.")]
135-
InvalidAddrs,
136133
#[error("Failed to parse response type field.")]
137134
ParseTypeField,
138135
#[error("Unexpected message type 'connect'")]

protocols/dcutr/src/protocol/outbound.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ pub enum UpgradeError {
136136
NoAddresses,
137137
#[error("Invalid expiration timestamp in reservation.")]
138138
InvalidReservationExpiration,
139-
#[deprecated(since = "0.8.1", note = "Error is no longer constructed.")]
140-
#[error("Invalid addresses in reservation.")]
141-
InvalidAddrs,
142139
#[error("Failed to parse response type field.")]
143140
ParseTypeField,
144141
#[error("Unexpected message type 'connect'")]

0 commit comments

Comments
 (0)