File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1071,10 +1071,11 @@ impl File {
10711071 cfg_if:: cfg_if! {
10721072 if #[ cfg( target_os = "redox" ) ] {
10731073 // Redox doesn't appear to support `UTIME_OMIT`.
1074- return Err ( io:: const_io_error!(
1074+ drop( times) ;
1075+ Err ( io:: const_io_error!(
10751076 io:: ErrorKind :: Unsupported ,
10761077 "setting file times not supported" ,
1077- ) ) ;
1078+ ) )
10781079 } else if #[ cfg( any( target_os = "android" , target_os = "macos" ) ) ] {
10791080 // futimens requires macOS 10.13, and Android API level 19
10801081 cvt( unsafe {
@@ -1100,12 +1101,12 @@ impl File {
11001101 ) ) ,
11011102 }
11021103 } ) ?;
1104+ Ok ( ( ) )
11031105 } else {
11041106 cvt( unsafe { libc:: futimens( self . as_raw_fd( ) , times. 0 . as_ptr( ) ) } ) ?;
1107+ Ok ( ( ) )
11051108 }
11061109 }
1107-
1108- Ok ( ( ) )
11091110 }
11101111}
11111112
You can’t perform that action at this time.
0 commit comments