Skip to content

Commit

Permalink
chore(relay): remove deprecated items
Browse files Browse the repository at this point in the history
Related: #3647.

Pull-Request: #3948.
  • Loading branch information
tcoratger authored May 15, 2023
1 parent 2512b6c commit 7c64c42
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 172 deletions.
2 changes: 1 addition & 1 deletion libp2p/src/tutorials/hole_punching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
//! post](https://blog.ipfs.io/2022-01-20-libp2p-hole-punching/) to familiarize yourself with libp2p's hole
//! punching mechanism on a conceptual level.
//!
//! We will be using the [Circuit Relay v2](crate::relay::v2) and the [Direct Connection
//! We will be using the [Circuit Relay](crate::relay) and the [Direct Connection
//! Upgrade through Relay (DCUtR)](crate::dcutr) protocol.
//!
//! You will need 3 machines for this tutorial:
Expand Down
3 changes: 3 additions & 0 deletions protocols/relay/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@
These variants are no longer constructed.
See [PR 3605].

- Remove deprecated items. See [PR 3948].

[PR 3605]: https://github.com/libp2p/rust-libp2p/pull/3605
[PR 3715]: https://github.com/libp2p/rust-libp2p/pull/3715
[PR 3829]: https://github.com/libp2p/rust-libp2p/pull/3829
[PR 3948]: https://github.com/libp2p/rust-libp2p/pull/3948

## 0.15.2

Expand Down
1 change: 0 additions & 1 deletion protocols/relay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ mod copy_future;
mod multiaddr_ext;
mod priv_client;
mod protocol;
pub mod v2;

mod proto {
#![allow(unreachable_pub)]
Expand Down
5 changes: 0 additions & 5 deletions protocols/relay/src/priv_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,6 @@ pub fn new(local_peer_id: PeerId) -> (Transport, Behaviour) {
}

impl Behaviour {
#[deprecated(since = "0.15.0", note = "Use libp2p_relay::client::new instead.")]
pub fn new_transport_and_behaviour(local_peer_id: PeerId) -> (transport::Transport, Self) {
new(local_peer_id)
}

fn on_connection_closed(
&mut self,
ConnectionClosed {
Expand Down
5 changes: 3 additions & 2 deletions protocols/relay/src/priv_client/transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ fn parse_relayed_multiaddr(addr: Multiaddr) -> Result<RelayedMultiaddr, Transpor
Ok(relayed_multiaddr)
}

pub struct Listener {
pub(crate) struct Listener {
listener_id: ListenerId,
/// Queue of events to report when polled.
queued_events: VecDeque<<Self as Stream>::Item>,
Expand Down Expand Up @@ -422,8 +422,9 @@ impl From<Error> for TransportError<Error> {

/// Message from the [`Transport`] to the [`Behaviour`](crate::Behaviour)
/// [`NetworkBehaviour`](libp2p_swarm::NetworkBehaviour).
pub enum TransportToBehaviourMsg {
pub(crate) enum TransportToBehaviourMsg {
/// Dial destination node via relay node.
#[allow(dead_code)]
DialReq {
request_id: RequestId,
relay_addr: Multiaddr,
Expand Down
163 changes: 0 additions & 163 deletions protocols/relay/src/v2.rs

This file was deleted.

0 comments on commit 7c64c42

Please sign in to comment.