File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -365,9 +365,7 @@ pub struct Symbol<T> {
365365impl < T > Symbol < T > {
366366 /// Convert the loaded `Symbol` into a raw pointer.
367367 pub fn into_raw ( self ) -> * mut raw:: c_void {
368- let pointer = self . pointer ;
369- mem:: forget ( self ) ;
370- pointer
368+ self . pointer
371369 }
372370}
373371
Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ impl fmt::Debug for Library {
307307 let mut buf =
308308 mem:: MaybeUninit :: <[ mem:: MaybeUninit :: < WCHAR > ; 1024 ] >:: uninit ( ) . assume_init ( ) ;
309309 let len = libloaderapi:: GetModuleFileNameW ( self . 0 ,
310- ( & mut buf[ ..] ) . as_mut_ptr ( ) . cast ( ) , 1024 ) as usize ;
310+ buf[ ..] . as_mut_ptr ( ) . cast ( ) , 1024 ) as usize ;
311311 if len == 0 {
312312 f. write_str ( & format ! ( "Library@{:p}" , self . 0 ) )
313313 } else {
@@ -333,9 +333,7 @@ pub struct Symbol<T> {
333333impl < T > Symbol < T > {
334334 /// Convert the loaded `Symbol` into a handle.
335335 pub fn into_raw ( self ) -> FARPROC {
336- let pointer = self . pointer ;
337- mem:: forget ( self ) ;
338- pointer
336+ self . pointer
339337 }
340338}
341339
You can’t perform that action at this time.
0 commit comments