Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8d2c680

Browse files
arihant2mathcoolreader18
authored andcommitted
fix non-windows build
1 parent 4d9804f commit 8d2c680

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

stdlib/src/socket.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -2182,8 +2182,6 @@ mod _socket {
21822182
))]
21832183
#[pyfunction]
21842184
fn if_nameindex(vm: &VirtualMachine) -> PyResult<Vec<PyObjectRef>> {
2185-
use windows_sys::Win32::NetworkManagement::Ndis::NET_LUID_LH;
2186-
21872185
#[cfg(not(windows))]
21882186
{
21892187
let list = nix::net::if_::if_nameindex()
@@ -2202,6 +2200,7 @@ mod _socket {
22022200
#[cfg(windows)]
22032201
{
22042202
use std::ptr;
2203+
use windows_sys::Win32::NetworkManagement::Ndis::NET_LUID_LH;
22052204

22062205
let table = MibTable::get_raw().map_err(|err| err.into_pyexception(vm))?;
22072206
let list = table.as_slice().iter().map(|entry| {

0 commit comments

Comments
 (0)