windows bump to 0.52
This commit is contained in:
parent
5e2a7ac47a
commit
35fe26757a
11 changed files with 16 additions and 17 deletions
|
@ -6176,11 +6176,12 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f"
|
||||
checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
|
||||
dependencies = [
|
||||
"windows-targets 0.48.5",
|
||||
"windows-core",
|
||||
"windows-targets 0.52.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
|
@ -51,5 +51,5 @@ default-features = false
|
|||
features = ["read_core", "elf", "macho", "pe", "xcoff", "unaligned", "archive", "write"]
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
features = ["Win32_Globalization"]
|
||||
|
|
|
@ -33,7 +33,7 @@ tracing = "0.1"
|
|||
version = "0.12"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Storage_FileSystem",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -60,7 +60,7 @@ libc = "0.2"
|
|||
# tidy-alphabetical-end
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
features = [
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
]
|
||||
|
|
|
@ -30,7 +30,7 @@ unicode-width = "0.1.4"
|
|||
# tidy-alphabetical-end
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Security",
|
||||
|
|
|
@ -27,7 +27,8 @@ pub fn acquire_global_lock(name: &str) -> Box<dyn Any> {
|
|||
impl Drop for Handle {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
CloseHandle(self.0);
|
||||
// FIXME can panic here
|
||||
CloseHandle(self.0).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +38,8 @@ pub fn acquire_global_lock(name: &str) -> Box<dyn Any> {
|
|||
impl Drop for Guard {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
ReleaseMutex((self.0).0);
|
||||
// FIXME can panic here
|
||||
ReleaseMutex((self.0).0).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ libc = "0.2"
|
|||
# tidy-alphabetical-end
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_LibraryLoader",
|
||||
|
|
|
@ -143,7 +143,6 @@ fn current_dll_path() -> Result<PathBuf, String> {
|
|||
&mut module,
|
||||
)
|
||||
}
|
||||
.ok()
|
||||
.map_err(|e| e.to_string())?;
|
||||
|
||||
let mut filename = vec![0; 1024];
|
||||
|
|
|
@ -34,7 +34,7 @@ libc = "0.2"
|
|||
miow = "0.6"
|
||||
|
||||
[target.'cfg(windows)'.dependencies.windows]
|
||||
version = "0.48.0"
|
||||
version = "0.52.0"
|
||||
features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_System_Diagnostics_Debug",
|
||||
|
|
Loading…
Add table
Reference in a new issue