diff --git a/libp2p/src/builder/phase/bandwidth_logging.rs b/libp2p/src/builder/phase/bandwidth_logging.rs index f24df5f3df5..13fe20caecb 100644 --- a/libp2p/src/builder/phase/bandwidth_logging.rs +++ b/libp2p/src/builder/phase/bandwidth_logging.rs @@ -13,28 +13,6 @@ pub struct BandwidthLoggingPhase { impl SwarmBuilder> { - #[allow(deprecated)] - #[deprecated(note = "Use `with_bandwidth_metrics` instead.")] - pub fn with_bandwidth_logging( - self, - ) -> ( - SwarmBuilder>, - Arc, - ) { - let (transport, sinks) = self.phase.transport.with_bandwidth_logging(); - ( - SwarmBuilder { - phase: BandwidthMetricsPhase { - relay_behaviour: self.phase.relay_behaviour, - transport, - }, - keypair: self.keypair, - phantom: PhantomData, - }, - sinks, - ) - } - pub fn without_bandwidth_logging(self) -> SwarmBuilder> { SwarmBuilder { phase: BandwidthMetricsPhase { diff --git a/libp2p/src/builder/phase/other_transport.rs b/libp2p/src/builder/phase/other_transport.rs index c3b951c8c75..9c7ddd994e4 100644 --- a/libp2p/src/builder/phase/other_transport.rs +++ b/libp2p/src/builder/phase/other_transport.rs @@ -173,28 +173,6 @@ impl .with_relay_client(security_upgrade, multiplexer_upgrade) } } -impl - SwarmBuilder> -{ - #[allow(deprecated)] - #[deprecated(note = "Use `with_bandwidth_metrics` instead.")] - pub fn with_bandwidth_logging( - self, - ) -> ( - SwarmBuilder< - Provider, - BandwidthMetricsPhase, - >, - Arc, - ) { - #[allow(deprecated)] - self.without_any_other_transports() - .without_dns() - .without_websocket() - .without_relay() - .with_bandwidth_logging() - } -} #[cfg(feature = "metrics")] impl SwarmBuilder> diff --git a/libp2p/src/builder/phase/quic.rs b/libp2p/src/builder/phase/quic.rs index 1b6329c1095..d1cf5aeb2ad 100644 --- a/libp2p/src/builder/phase/quic.rs +++ b/libp2p/src/builder/phase/quic.rs @@ -276,27 +276,6 @@ impl_quic_phase_with_websocket!( super::provider::Tokio, rw_stream_sink::RwStreamSink> ); -impl SwarmBuilder> { - #[allow(deprecated)] - #[deprecated(note = "Use `with_bandwidth_metrics` instead.")] - pub fn with_bandwidth_logging( - self, - ) -> ( - SwarmBuilder< - Provider, - BandwidthMetricsPhase, - >, - Arc, - ) { - #[allow(deprecated)] - self.without_quic() - .without_any_other_transports() - .without_dns() - .without_websocket() - .without_relay() - .with_bandwidth_logging() - } -} #[cfg(feature = "metrics")] impl SwarmBuilder> { pub fn with_bandwidth_metrics(