From f0ed4388c088a2df648355b1711682078b834d09 Mon Sep 17 00:00:00 2001 From: Thomas de Zeeuw Date: Mon, 27 Jan 2025 16:33:49 +0100 Subject: [PATCH] Remove Socket::(bind_)device_by_index (#548) Replaced by Socket::(bind_)device_by_index_v4. --- src/sys/unix.rs | 58 ------------------------------------------------- 1 file changed, 58 deletions(-) diff --git a/src/sys/unix.rs b/src/sys/unix.rs index b40c3df1..05cb2e91 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -2029,35 +2029,6 @@ impl crate::Socket { .map(|_| ()) } - /// This method is deprecated, use [`crate::Socket::bind_device_by_index_v4`]. - #[cfg(all( - feature = "all", - any( - target_os = "ios", - target_os = "visionos", - target_os = "macos", - target_os = "tvos", - target_os = "watchos", - ) - ))] - #[cfg_attr( - docsrs, - doc(cfg(all( - feature = "all", - any( - target_os = "ios", - target_os = "visionos", - target_os = "macos", - target_os = "tvos", - target_os = "watchos", - ) - ))) - )] - #[deprecated = "Use `Socket::bind_device_by_index_v4` instead"] - pub fn bind_device_by_index(&self, interface: Option) -> io::Result<()> { - self.bind_device_by_index_v4(interface) - } - /// Sets the value for `IP_BOUND_IF` option on this socket. /// /// If a socket is bound to an interface, only packets received from that @@ -2168,35 +2139,6 @@ impl crate::Socket { Ok(NonZeroU32::new(index)) } - /// This method is deprecated, use [`crate::Socket::device_index_v4`]. - #[cfg(all( - feature = "all", - any( - target_os = "ios", - target_os = "visionos", - target_os = "macos", - target_os = "tvos", - target_os = "watchos", - ) - ))] - #[cfg_attr( - docsrs, - doc(cfg(all( - feature = "all", - any( - target_os = "ios", - target_os = "visionos", - target_os = "macos", - target_os = "tvos", - target_os = "watchos", - ) - ))) - )] - #[deprecated = "Use `Socket::device_index_v4` instead"] - pub fn device_index(&self) -> io::Result> { - self.device_index_v4() - } - /// Gets the value for `IPV6_BOUND_IF` option on this socket, i.e. the index /// for the interface to which the socket is bound. ///