Skip to content

Commit f0ed438

Browse files
Remove Socket::(bind_)device_by_index (#548)
Replaced by Socket::(bind_)device_by_index_v4.
1 parent 0cb5119 commit f0ed438

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

src/sys/unix.rs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2029,35 +2029,6 @@ impl crate::Socket {
20292029
.map(|_| ())
20302030
}
20312031

2032-
/// This method is deprecated, use [`crate::Socket::bind_device_by_index_v4`].
2033-
#[cfg(all(
2034-
feature = "all",
2035-
any(
2036-
target_os = "ios",
2037-
target_os = "visionos",
2038-
target_os = "macos",
2039-
target_os = "tvos",
2040-
target_os = "watchos",
2041-
)
2042-
))]
2043-
#[cfg_attr(
2044-
docsrs,
2045-
doc(cfg(all(
2046-
feature = "all",
2047-
any(
2048-
target_os = "ios",
2049-
target_os = "visionos",
2050-
target_os = "macos",
2051-
target_os = "tvos",
2052-
target_os = "watchos",
2053-
)
2054-
)))
2055-
)]
2056-
#[deprecated = "Use `Socket::bind_device_by_index_v4` instead"]
2057-
pub fn bind_device_by_index(&self, interface: Option<NonZeroU32>) -> io::Result<()> {
2058-
self.bind_device_by_index_v4(interface)
2059-
}
2060-
20612032
/// Sets the value for `IP_BOUND_IF` option on this socket.
20622033
///
20632034
/// If a socket is bound to an interface, only packets received from that
@@ -2168,35 +2139,6 @@ impl crate::Socket {
21682139
Ok(NonZeroU32::new(index))
21692140
}
21702141

2171-
/// This method is deprecated, use [`crate::Socket::device_index_v4`].
2172-
#[cfg(all(
2173-
feature = "all",
2174-
any(
2175-
target_os = "ios",
2176-
target_os = "visionos",
2177-
target_os = "macos",
2178-
target_os = "tvos",
2179-
target_os = "watchos",
2180-
)
2181-
))]
2182-
#[cfg_attr(
2183-
docsrs,
2184-
doc(cfg(all(
2185-
feature = "all",
2186-
any(
2187-
target_os = "ios",
2188-
target_os = "visionos",
2189-
target_os = "macos",
2190-
target_os = "tvos",
2191-
target_os = "watchos",
2192-
)
2193-
)))
2194-
)]
2195-
#[deprecated = "Use `Socket::device_index_v4` instead"]
2196-
pub fn device_index(&self) -> io::Result<Option<NonZeroU32>> {
2197-
self.device_index_v4()
2198-
}
2199-
22002142
/// Gets the value for `IPV6_BOUND_IF` option on this socket, i.e. the index
22012143
/// for the interface to which the socket is bound.
22022144
///

0 commit comments

Comments
 (0)