mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-15 15:16:37 +00:00
Rm drop impl for LibraryHandle
As unmounting dynlib might cause UB Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
1add356939
commit
a026dc2a4e
1 changed files with 1 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
use std::{mem, ptr};
|
use std::{mem, ptr};
|
||||||
use windows_sys::Win32::{
|
use windows_sys::Win32::{
|
||||||
Foundation::{FreeLibrary, HMODULE, S_OK},
|
Foundation::{HMODULE, S_OK},
|
||||||
System::{
|
System::{
|
||||||
LibraryLoader::{GetProcAddress, LoadLibraryA},
|
LibraryLoader::{GetProcAddress, LoadLibraryA},
|
||||||
SystemInformation::{
|
SystemInformation::{
|
||||||
|
@ -33,12 +33,6 @@ impl LibraryHandle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Drop for LibraryHandle {
|
|
||||||
fn drop(&mut self) {
|
|
||||||
unsafe { FreeLibrary(self.0) };
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetMachineTypeAttributesFuncType =
|
type GetMachineTypeAttributesFuncType =
|
||||||
unsafe extern "system" fn(u16, *mut MACHINE_ATTRIBUTES) -> i32;
|
unsafe extern "system" fn(u16, *mut MACHINE_ATTRIBUTES) -> i32;
|
||||||
const _: () = {
|
const _: () = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue