Skip to content

Commit

Permalink
udp: avoid warning about unused set_sendmsg_einval() method
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Apr 19, 2023
1 parent 297f875 commit aaa58fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions quinn-udp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@
use std::os::unix::io::AsRawFd;
#[cfg(windows)]
use std::os::windows::io::AsRawSocket;
#[cfg(not(windows))]
use std::sync::atomic::AtomicBool;
use std::{
net::{IpAddr, Ipv6Addr, SocketAddr},
sync::{
atomic::{AtomicBool, AtomicUsize, Ordering},
atomic::{AtomicUsize, Ordering},
Mutex,
},
time::{Duration, Instant},
Expand Down Expand Up @@ -85,7 +87,7 @@ impl UdpState {

/// Sets the flag indicating we got EINVAL error from `sendmsg` or `sendmmsg` syscall.
#[inline]
#[cfg(not(windows))]
#[cfg(all(unix, not(any(target_os = "macos", target_os = "ios"))))]
fn set_sendmsg_einval(&self) {
self.sendmsg_einval.store(true, Ordering::Relaxed)
}
Expand Down

0 comments on commit aaa58fc

Please sign in to comment.