diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 007e00e7710..2eec5d3b054 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -2,6 +2,8 @@ - Remove blanket-impl of `{In,Out}boundUpgrade` for `{In,Out}boundConnectionUpgrade`. See [PR 4695](https://github.com/libp2p/rust-libp2p/pull/4695). +- Remove deprecated functions from `ListenerId`. + See [PR 4736](https://github.com/libp2p/rust-libp2p/pull/4736). ## 0.40.1 diff --git a/core/src/transport.rs b/core/src/transport.rs index 9aeddb72ad0..5a214fdcda2 100644 --- a/core/src/transport.rs +++ b/core/src/transport.rs @@ -250,23 +250,10 @@ pub trait Transport { pub struct ListenerId(usize); impl ListenerId { - #[deprecated(note = "Renamed to ` ListenerId::next`.")] - #[allow(clippy::new_without_default)] - /// Creates a new `ListenerId`. - pub fn new() -> Self { - ListenerId::next() - } - /// Creates a new `ListenerId`. pub fn next() -> Self { ListenerId(NEXT_LISTENER_ID.fetch_add(1, Ordering::SeqCst)) } - - #[deprecated(note = "Use ` ListenerId::next` instead.")] - #[allow(clippy::should_implement_trait)] - pub fn default() -> Self { - Self::next() - } } /// Event produced by [`Transport`]s.