diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:03 +0000 |
commit | 64d98f8ee037282c35007b64c2649055c56af1db (patch) | |
tree | 5492bcf97fce41ee1c0b1cc2add283f3e66cdab0 /vendor/libloading/src/os/windows/mod.rs | |
parent | Adding debian version 1.67.1+dfsg1-1. (diff) | |
download | rustc-64d98f8ee037282c35007b64c2649055c56af1db.tar.xz rustc-64d98f8ee037282c35007b64c2649055c56af1db.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/libloading/src/os/windows/mod.rs')
-rw-r--r-- | vendor/libloading/src/os/windows/mod.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/vendor/libloading/src/os/windows/mod.rs b/vendor/libloading/src/os/windows/mod.rs index eadeb6980..e3da940a2 100644 --- a/vendor/libloading/src/os/windows/mod.rs +++ b/vendor/libloading/src/os/windows/mod.rs @@ -307,7 +307,7 @@ impl fmt::Debug for Library { let mut buf = mem::MaybeUninit::<[mem::MaybeUninit::<WCHAR>; 1024]>::uninit().assume_init(); let len = libloaderapi::GetModuleFileNameW(self.0, - (&mut buf[..]).as_mut_ptr().cast(), 1024) as usize; + buf[..].as_mut_ptr().cast(), 1024) as usize; if len == 0 { f.write_str(&format!("Library@{:p}", self.0)) } else { @@ -333,9 +333,7 @@ pub struct Symbol<T> { impl<T> Symbol<T> { /// Convert the loaded `Symbol` into a handle. pub fn into_raw(self) -> FARPROC { - let pointer = self.pointer; - mem::forget(self); - pointer + self.pointer } } |