mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
build(deps): bump the deps group across 1 directory with 2 updates (#1859)
* build(deps): bump the deps group across 1 directory with 2 updates Bumps the deps group with 2 updates in the / directory: [fs4](https://github.com/al8n/fs4-rs) and [windows-sys](https://github.com/microsoft/windows-rs). Updates `fs4` from 0.8.4 to 0.9.1 - [Release notes](https://github.com/al8n/fs4-rs/releases) - [Commits](https://github.com/al8n/fs4-rs/commits) Updates `windows-sys` from 0.52.0 to 0.59.0 - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/compare/0.52.0...0.59.0) --- updated-dependencies: - dependency-name: fs4 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps - dependency-name: windows-sys dependency-type: direct:production update-type: version-update:semver-minor dependency-group: deps ... Signed-off-by: dependabot[bot] <support@github.com> * Fix use of fs4 Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix windows.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Rm drop impl for LibraryHandle As unmounting dynlib might cause UB Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> * Fix clippy in windows.rs Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
5d57d4506e
commit
cdbb121112
5 changed files with 8 additions and 14 deletions
|
@ -27,7 +27,7 @@ tracing = ["dep:tracing"]
|
|||
cli-logging = ["tracing", "dep:tracing-subscriber"]
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows-sys = { version = "0.52.0", features = [
|
||||
windows-sys = { version = "0.59.0", features = [
|
||||
"Win32_System_Threading",
|
||||
"Win32_System_SystemInformation",
|
||||
"Win32_Foundation",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
use std::mem;
|
||||
use windows_sys::Win32::{
|
||||
Foundation::{FreeLibrary, HMODULE, S_OK},
|
||||
Foundation::{HMODULE, S_OK},
|
||||
System::{
|
||||
LibraryLoader::{GetProcAddress, LoadLibraryA},
|
||||
SystemInformation::{
|
||||
|
@ -16,7 +16,7 @@ struct LibraryHandle(HMODULE);
|
|||
impl LibraryHandle {
|
||||
fn new(name: &[u8]) -> Option<Self> {
|
||||
let handle = unsafe { LoadLibraryA(name.as_ptr() as _) };
|
||||
(handle != 0).then(|| Self(handle))
|
||||
(!handle.is_null()).then_some(Self(handle))
|
||||
}
|
||||
|
||||
/// Get a function pointer to a function in the library.
|
||||
|
@ -33,12 +33,6 @@ impl LibraryHandle {
|
|||
}
|
||||
}
|
||||
|
||||
impl Drop for LibraryHandle {
|
||||
fn drop(&mut self) {
|
||||
unsafe { FreeLibrary(self.0) };
|
||||
}
|
||||
}
|
||||
|
||||
type GetMachineTypeAttributesFuncType =
|
||||
unsafe extern "system" fn(u16, *mut MACHINE_ATTRIBUTES) -> i32;
|
||||
const _: () = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue