From 811a28e01ff9cfbb4324676ebb429ec208f148e8 Mon Sep 17 00:00:00 2001 From: Benjamin Saunders Date: Tue, 2 Mar 2021 21:29:02 -0800 Subject: [PATCH] Remove obsolete safety asserts These will cause spurious panics once https://github.com/rust-lang/rust/pull/78802 is merged. (cherry picked from commit 9287a34d63889a3a45023e5f54b3951fe371e59f) --- quinn/src/platform/unix.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/quinn/src/platform/unix.rs b/quinn/src/platform/unix.rs index 36aa0f6a0..cdf7b51a0 100644 --- a/quinn/src/platform/unix.rs +++ b/quinn/src/platform/unix.rs @@ -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::(), - mem::size_of::() - ); - assert_eq!( - mem::size_of::(), - mem::size_of::() - ); - let mut cmsg_platform_space = 0; if cfg!(target_os = "linux") { cmsg_platform_space +=