Skip to content

Commit 5e2606d

Browse files
chansukeThomasdezeeuw
authored andcommitted
hotfix: replace unused_unsafe with unsafe_op_in_unsafe_in
1 parent 43f286c commit 5e2606d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sys/unix.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ impl<'a> MaybeUninitSlice<'a> {
474474
}
475475
}
476476

477-
#[allow(unused_unsafe)] // TODO: replace with `unsafe_op_in_unsafe_fn` once stable.
477+
#[allow(unsafe_op_in_unsafe_fn)]
478478
pub(crate) fn unix_sockaddr(path: &Path) -> io::Result<SockAddr> {
479479
// SAFETY: a `sockaddr_storage` of all zeros is valid.
480480
let mut storage = unsafe { mem::zeroed::<sockaddr_storage>() };
@@ -529,7 +529,7 @@ impl SockAddr {
529529
///
530530
/// This function can never fail. In a future version of this library it will be made
531531
/// infallible.
532-
#[allow(unused_unsafe)] // TODO: replace with `unsafe_op_in_unsafe_fn` once stable.
532+
#[allow(unsafe_op_in_unsafe_fn)]
533533
#[cfg(all(feature = "all", any(target_os = "android", target_os = "linux")))]
534534
#[cfg_attr(
535535
docsrs,

src/sys/windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,7 @@ pub(crate) fn to_mreqn(
776776
}
777777
}
778778

779-
#[allow(unused_unsafe)] // TODO: replace with `unsafe_op_in_unsafe_fn` once stable.
779+
#[allow(unsafe_op_in_unsafe_fn)]
780780
pub(crate) fn unix_sockaddr(path: &Path) -> io::Result<SockAddr> {
781781
// SAFETY: a `sockaddr_storage` of all zeros is valid.
782782
let mut storage = unsafe { mem::zeroed::<sockaddr_storage>() };

0 commit comments

Comments
 (0)