Skip to content

Commit 37aec3e

Browse files
committed
Fix dead_code warnings for Windows
1 parent 02e9be4 commit 37aec3e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/sys/windows/selector.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ use winapi::um::minwinbase::OVERLAPPED;
2929

3030
#[derive(Debug)]
3131
struct AfdGroup {
32+
#[cfg_attr(not(feature = "net"), allow(dead_code))]
3233
cp: Arc<CompletionPort>,
3334
afd_group: Mutex<Vec<Arc<Afd>>>,
3435
}
@@ -93,7 +94,6 @@ pub struct SockState {
9394
poll_info: AfdPollInfo,
9495
afd: Arc<Afd>,
9596

96-
raw_socket: RawSocket,
9797
base_socket: RawSocket,
9898

9999
user_evts: u32,
@@ -107,7 +107,7 @@ pub struct SockState {
107107
// last raw os error
108108
error: Option<i32>,
109109

110-
pinned: PhantomPinned,
110+
_pinned: PhantomPinned,
111111
}
112112

113113
impl SockState {
@@ -263,15 +263,14 @@ cfg_io_source! {
263263
iosb: IoStatusBlock::zeroed(),
264264
poll_info: AfdPollInfo::zeroed(),
265265
afd,
266-
raw_socket,
267266
base_socket: get_base_socket(raw_socket)?,
268267
user_evts: 0,
269268
pending_evts: 0,
270269
user_data: 0,
271270
poll_status: SockPollStatus::Idle,
272271
delete_pending: false,
273272
error: None,
274-
pinned: PhantomPinned,
273+
_pinned: PhantomPinned,
275274
})
276275
}
277276

0 commit comments

Comments
 (0)