Skip to content

Commit

Permalink
Fix dead_code warnings for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed Oct 8, 2021
1 parent 02e9be4 commit 37aec3e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/sys/windows/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use winapi::um::minwinbase::OVERLAPPED;

#[derive(Debug)]
struct AfdGroup {
#[cfg_attr(not(feature = "net"), allow(dead_code))]
cp: Arc<CompletionPort>,
afd_group: Mutex<Vec<Arc<Afd>>>,
}
Expand Down Expand Up @@ -93,7 +94,6 @@ pub struct SockState {
poll_info: AfdPollInfo,
afd: Arc<Afd>,

raw_socket: RawSocket,
base_socket: RawSocket,

user_evts: u32,
Expand All @@ -107,7 +107,7 @@ pub struct SockState {
// last raw os error
error: Option<i32>,

pinned: PhantomPinned,
_pinned: PhantomPinned,
}

impl SockState {
Expand Down Expand Up @@ -263,15 +263,14 @@ cfg_io_source! {
iosb: IoStatusBlock::zeroed(),
poll_info: AfdPollInfo::zeroed(),
afd,
raw_socket,
base_socket: get_base_socket(raw_socket)?,
user_evts: 0,
pending_evts: 0,
user_data: 0,
poll_status: SockPollStatus::Idle,
delete_pending: false,
error: None,
pinned: PhantomPinned,
_pinned: PhantomPinned,
})
}

Expand Down

0 comments on commit 37aec3e

Please sign in to comment.