File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -301,7 +301,7 @@ impl Entry {
301301
302302
303303    /// Returns the bare file name of this directory entry without any other leading path component. 
304- ///  
304+ /// (I had to split the functions because one is const and one isn't, you can probably hack around that with a macro.  
305305#[ cfg( all( target_os = "linux" ,  target_arch = "x86_64" ) ) ]  
306306    ///PLEASE REMOVE THESE COMMENTS (OBVIOUSLY WHEN DONE)) 
307307/// This utilises a constant-time constant function strlen implementation that's faster than `libc::strlen`` (std library internal implementation) 
@@ -311,11 +311,8 @@ impl Entry {
311311        unsafe { 
312312            //we need to transmute here because we're trying to match the original type of this implementation to not break it 
313313            std:: mem:: transmute ( & * std:: ptr:: slice_from_raw_parts ( self . 0 . d_name . as_ptr ( )  as   * const  u8 ,  str_length) ) 
314- 
315- 
316-         //unsafe { ffi::CStr::from_ptr(self.0.d_name.as_ptr()) } 
314+         } 
317315    } 
318- } 
319316
320317    #[ cfg( not( all( target_os = "linux" ,  target_arch = "x86_64" ) ) ) ]  
321318    pub  fn  file_name ( & self )  -> & ffi:: CStr  { 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments