From 6f8f71ee1917887f7a9313b2bafd0b309f251789 Mon Sep 17 00:00:00 2001 From: chansuke Date: Thu, 22 Dec 2022 21:45:14 +0900 Subject: [PATCH] hotfix: replace `unused_unsafe` with `unsafe_op_in_unsafe_in` --- src/sys/unix.rs | 4 ++-- src/sys/windows.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sys/unix.rs b/src/sys/unix.rs index cae633ae..dd5b48f2 100644 --- a/src/sys/unix.rs +++ b/src/sys/unix.rs @@ -474,7 +474,7 @@ impl<'a> MaybeUninitSlice<'a> { } } -#[allow(unused_unsafe)] // TODO: replace with `unsafe_op_in_unsafe_fn` once stable. +#[allow(unsafe_op_in_unsafe_fn)] pub(crate) fn unix_sockaddr(path: &Path) -> io::Result { // SAFETY: a `sockaddr_storage` of all zeros is valid. let mut storage = unsafe { mem::zeroed::() }; @@ -529,7 +529,7 @@ impl SockAddr { /// /// This function can never fail. In a future version of this library it will be made /// infallible. - #[allow(unused_unsafe)] // TODO: replace with `unsafe_op_in_unsafe_fn` once stable. + #[allow(unsafe_op_in_unsafe_fn)] #[cfg(all(feature = "all", any(target_os = "android", target_os = "linux")))] #[cfg_attr( docsrs, diff --git a/src/sys/windows.rs b/src/sys/windows.rs index c9e57dd1..cd06640e 100644 --- a/src/sys/windows.rs +++ b/src/sys/windows.rs @@ -776,7 +776,7 @@ pub(crate) fn to_mreqn( } } -#[allow(unused_unsafe)] // TODO: replace with `unsafe_op_in_unsafe_fn` once stable. +#[allow(unsafe_op_in_unsafe_fn)] pub(crate) fn unix_sockaddr(path: &Path) -> io::Result { // SAFETY: a `sockaddr_storage` of all zeros is valid. let mut storage = unsafe { mem::zeroed::() };