Skip to content
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 @@ -29,7 +29,7 @@ mach2 = "0.4"
libc = "0.2"

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.59"
version = "0.52"
features = [
"Win32_Foundation",
"Win32_System_LibraryLoader",
Expand Down
7 changes: 2 additions & 5 deletions src/rt_win.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ mod avrt_lib {
let task_handle = unsafe {
(self.av_set_mm_thread_characteristics_w)(task_name, &mut mmcss_task_index)
};
win32_error_if(task_handle.is_null())?;
win32_error_if(task_handle == 0)?;
Ok((mmcss_task_index, task_handle))
}

Expand Down Expand Up @@ -174,7 +174,7 @@ mod win32_utils {
impl OwnedLibrary {
pub(super) fn try_new(lib_file_name: PCWSTR) -> Result<Self, WIN32_ERROR> {
let module = unsafe { LoadLibraryW(lib_file_name) };
win32_error_if(module.is_null())?;
win32_error_if(module == 0)?;
Ok(Self(module))
}

Expand All @@ -201,9 +201,6 @@ mod win32_utils {
}
}
}

unsafe impl Send for OwnedLibrary {}
unsafe impl Sync for OwnedLibrary {}
}

#[cfg(test)]
Expand Down
Loading