Skip to content

Commit

Permalink
Remove Socket::(bind_)device_by_index (#548)
Browse files Browse the repository at this point in the history
Replaced by Socket::(bind_)device_by_index_v4.
  • Loading branch information
Thomasdezeeuw authored Jan 27, 2025
1 parent 0cb5119 commit f0ed438
Showing 1 changed file with 0 additions and 58 deletions.
58 changes: 0 additions & 58 deletions src/sys/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<NonZeroU32>) -> 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
Expand Down Expand Up @@ -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<Option<NonZeroU32>> {
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.
///
Expand Down

0 comments on commit f0ed438

Please sign in to comment.