formatting

This commit is contained in:
Ashwin Naren
2025-03-05 11:07:20 -08:00
committed by Noa
parent ddf2e591c6
commit b4929d258d
4 changed files with 18 additions and 17 deletions

View File

@@ -303,7 +303,12 @@ mod _overlapped {
vm: &VirtualMachine,
) -> PyResult<isize> {
let r = unsafe {
windows_sys::Win32::System::IO::CreateIoCompletionPort(handle as _, port as _, key, concurrency) as isize
windows_sys::Win32::System::IO::CreateIoCompletionPort(
handle as _,
port as _,
key,
concurrency,
) as isize
};
if r as usize == 0 {
return Err(errno_err(vm));

View File

@@ -36,7 +36,9 @@ mod _socket {
#[cfg(windows)]
mod c {
pub use windows_sys::Win32::NetworkManagement::IpHelper::{if_indextoname, if_nametoindex};
pub use windows_sys::Win32::Networking::WinSock::{INADDR_ANY, INADDR_LOOPBACK, INADDR_BROADCAST, INADDR_NONE};
pub use windows_sys::Win32::Networking::WinSock::{
INADDR_ANY, INADDR_BROADCAST, INADDR_LOOPBACK, INADDR_NONE,
};
pub use windows_sys::Win32::Networking::WinSock::{
AF_APPLETALK, AF_DECnet, AF_IPX, AF_LINK, AI_ADDRCONFIG, AI_ALL, AI_CANONNAME,
@@ -1757,12 +1759,7 @@ mod _socket {
.map(|s| s.to_cstring(vm))
.transpose()?;
let cstr_proto = cstr_opt_as_ptr(&cstr_proto);
let serv = unsafe {
c::getservbyname(
cstr_name.as_ptr() as _,
cstr_proto as _,
)
};
let serv = unsafe { c::getservbyname(cstr_name.as_ptr() as _, cstr_proto as _) };
if serv.is_null() {
return Err(vm.new_os_error("service/proto not found".to_owned()));
}