Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(win): bumped windows-sys to v0.59.0 #142

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ libc = "0.2"
neli = "0.6"

[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.48.0"
version = "0.59.0"
features = [
"Win32_Foundation",
"Win32_Networking_WinSock",
Expand Down
11 changes: 4 additions & 7 deletions src/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

use windows_sys::Win32::{
Foundation::{
GetLastError, BOOL, ERROR_ADDRESS_NOT_ASSOCIATED, ERROR_BUFFER_OVERFLOW,
GetLastError, LocalFree, BOOL, ERROR_ADDRESS_NOT_ASSOCIATED, ERROR_BUFFER_OVERFLOW,
ERROR_INSUFFICIENT_BUFFER, ERROR_INVALID_PARAMETER, ERROR_NOT_ENOUGH_MEMORY,

Check warning on line 14 in src/windows.rs

View workflow job for this annotation

GitHub Actions / Builds on windows-latest with x86_64-pc-windows-msvc

unused import: `ERROR_INVALID_PARAMETER`

Check warning on line 14 in src/windows.rs

View workflow job for this annotation

GitHub Actions / Builds on windows-latest with x86_64-pc-windows-gnu

unused import: `ERROR_INVALID_PARAMETER`
ERROR_NOT_SUPPORTED, ERROR_NO_DATA, ERROR_SUCCESS, WIN32_ERROR,
},
NetworkManagement::IpHelper::{
Expand All @@ -21,11 +21,8 @@
Networking::WinSock::{
ADDRESS_FAMILY, AF_INET, AF_INET6, AF_UNSPEC, SOCKADDR_IN, SOCKADDR_IN6, SOCKADDR,
},
System::{
Diagnostics::Debug::{
FormatMessageW, FORMAT_MESSAGE_ALLOCATE_BUFFER, FORMAT_MESSAGE_FROM_SYSTEM,
},
Memory::LocalFree,
System::Diagnostics::Debug::{
FormatMessageW, FORMAT_MESSAGE_ALLOCATE_BUFFER, FORMAT_MESSAGE_FROM_SYSTEM,
},
};

Expand Down Expand Up @@ -260,7 +257,7 @@
let error_message = String::from_utf16_lossy(slice);

unsafe {
LocalFree(wide_ptr as isize);
LocalFree(&mut wide_ptr as *mut _ as *mut _);
}

error_message
Expand Down
Loading