File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -56,10 +56,6 @@ mod _winapi {
5656 UI :: WindowsAndMessaging :: SW_HIDE ,
5757 } ;
5858
59- fn GetLastError ( ) -> u32 {
60- unsafe { winapi:: um:: errhandlingapi:: GetLastError ( ) }
61- }
62-
6359 trait WindowsSysResultValue {
6460 type Ok : ToPyObject ;
6561 fn is_err ( & self ) -> bool ;
@@ -191,7 +187,7 @@ mod _winapi {
191187 vm : & VirtualMachine ,
192188 ) -> PyResult < windows_sys:: Win32 :: Storage :: FileSystem :: FILE_TYPE > {
193189 let file_type = unsafe { windows_sys:: Win32 :: Storage :: FileSystem :: GetFileType ( h. 0 ) } ;
194- if file_type == 0 && GetLastError ( ) != 0 {
190+ if file_type == 0 && unsafe { windows_sys :: Win32 :: Foundation :: GetLastError ( ) } != 0 {
195191 Err ( errno_err ( vm) )
196192 } else {
197193 Ok ( file_type)
@@ -389,7 +385,8 @@ mod _winapi {
389385 ( result, size. assume_init ( ) )
390386 } ;
391387 if !result. is_err ( )
392- || GetLastError ( ) != windows_sys:: Win32 :: Foundation :: ERROR_INSUFFICIENT_BUFFER
388+ || unsafe { windows_sys:: Win32 :: Foundation :: GetLastError ( ) }
389+ != windows_sys:: Win32 :: Foundation :: ERROR_INSUFFICIENT_BUFFER
393390 {
394391 return Err ( errno_err ( vm) ) ;
395392 }
You can’t perform that action at this time.
0 commit comments