mirror of
https://github.com/n0-computer/noq.git
synced 2026-10-04 05:25:48 +00:00
Remove obsolete safety asserts
These will cause spurious panics once
https://github.com/rust-lang/rust/pull/78802 is merged.
(cherry picked from commit 9287a34d63)
This commit is contained in:
committed by
Dirkjan Ochtman
parent
d799cbed61
commit
811a28e01f
@@ -2,7 +2,7 @@ use std::{
|
||||
io,
|
||||
io::IoSliceMut,
|
||||
mem::{self, MaybeUninit},
|
||||
net::{IpAddr, SocketAddr, SocketAddrV4, SocketAddrV6},
|
||||
net::{IpAddr, SocketAddr},
|
||||
os::unix::io::AsRawFd,
|
||||
ptr,
|
||||
task::{Context, Poll},
|
||||
@@ -73,16 +73,6 @@ impl UdpSocket {
|
||||
}
|
||||
|
||||
fn init(io: &mio::net::UdpSocket) -> io::Result<()> {
|
||||
// Safety
|
||||
assert_eq!(
|
||||
mem::size_of::<SocketAddrV4>(),
|
||||
mem::size_of::<libc::sockaddr_in>()
|
||||
);
|
||||
assert_eq!(
|
||||
mem::size_of::<SocketAddrV6>(),
|
||||
mem::size_of::<libc::sockaddr_in6>()
|
||||
);
|
||||
|
||||
let mut cmsg_platform_space = 0;
|
||||
if cfg!(target_os = "linux") {
|
||||
cmsg_platform_space +=
|
||||
|
||||
Reference in New Issue
Block a user