Skip to content

Commit 9bd531f

Browse files
BerrysoftThomasdezeeuw
authored andcommitted
Move use to the head of the file.
1 parent 109fb6a commit 9bd531f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sys/windows.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ use std::time::{Duration, Instant};
2020
use std::{process, ptr, slice};
2121

2222
use windows_sys::Win32::Foundation::{SetHandleInformation, HANDLE, HANDLE_FLAG_INHERIT};
23+
#[cfg(feature = "all")]
24+
use windows_sys::Win32::Networking::WinSock::SO_PROTOCOL_INFOW;
2325
use windows_sys::Win32::Networking::WinSock::{
2426
self, tcp_keepalive, FIONBIO, IN6_ADDR, IN6_ADDR_0, INVALID_SOCKET, IN_ADDR, IN_ADDR_0,
2527
POLLERR, POLLHUP, POLLRDNORM, POLLWRNORM, SD_BOTH, SD_RECEIVE, SD_SEND, SIO_KEEPALIVE_VALS,
@@ -925,8 +927,6 @@ impl crate::Socket {
925927
/// option on this socket.
926928
#[cfg(feature = "all")]
927929
pub fn protocol(&self) -> io::Result<Option<crate::Protocol>> {
928-
use windows_sys::Win32::Networking::WinSock::SO_PROTOCOL_INFOW;
929-
930930
let info = unsafe {
931931
getsockopt::<WSAPROTOCOL_INFOW>(self.as_raw(), SOL_SOCKET, SO_PROTOCOL_INFOW)?
932932
};

0 commit comments

Comments
 (0)