windows bump to 0.52

This commit is contained in:
klensy 2024-02-18 16:02:16 +03:00
parent 5e2a7ac47a
commit 35fe26757a
11 changed files with 16 additions and 17 deletions

View file

@ -69,7 +69,6 @@ impl Lock {
&mut overlapped,
)
}
.ok()
.map_err(|e| {
let err = io::Error::from_raw_os_error(e.code().0);
debug!("failed acquiring file lock: {}", err);

View file

@ -866,16 +866,14 @@ cfg_match! {
use std::mem;
use windows::{
// FIXME: change back to K32GetProcessMemoryInfo when windows crate
// updated to 0.49.0+ to drop dependency on psapi.dll
Win32::System::ProcessStatus::{GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS},
Win32::System::ProcessStatus::{K32GetProcessMemoryInfo, PROCESS_MEMORY_COUNTERS},
Win32::System::Threading::GetCurrentProcess,
};
let mut pmc = PROCESS_MEMORY_COUNTERS::default();
let pmc_size = mem::size_of_val(&pmc);
unsafe {
GetProcessMemoryInfo(
K32GetProcessMemoryInfo(
GetCurrentProcess(),
&mut pmc,
pmc_size as u32,