File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -539,14 +539,11 @@ pub fn set_perm(p: &Path, perm: FilePermissions) -> io::Result<()> {
539539}
540540
541541pub fn set_times ( _p : & Path , _times : FileTimes ) -> io:: Result < ( ) > {
542- Err ( io :: const_error! ( io :: ErrorKind :: Unsupported , "setting file times not supported" , ) )
542+ unsupported ( )
543543}
544544
545545pub fn set_times_nofollow ( _p : & Path , _times : FileTimes ) -> io:: Result < ( ) > {
546- Err ( io:: const_error!(
547- io:: ErrorKind :: Unsupported ,
548- "setting file times on symlinks not supported" ,
549- ) )
546+ unsupported ( )
550547}
551548
552549pub fn rmdir ( p : & Path ) -> io:: Result < ( ) > {
Original file line number Diff line number Diff line change @@ -1201,6 +1201,7 @@ impl fmt::Debug for OpenOptions {
12011201 target_os = "horizon" ,
12021202 target_os = "nuttx" ,
12031203) ) ) ]
1204+ #[ inline( always) ]
12041205fn to_timespec ( time : Option < SystemTime > ) -> io:: Result < libc:: timespec > {
12051206 match time {
12061207 Some ( time) if let Some ( ts) = time. t . to_timespec ( ) => Ok ( ts) ,
@@ -1217,6 +1218,7 @@ fn to_timespec(time: Option<SystemTime>) -> io::Result<libc::timespec> {
12171218}
12181219
12191220#[ cfg( target_vendor = "apple" ) ]
1221+ #[ inline( always) ]
12201222fn set_attrlist_with_times (
12211223 times : & FileTimes ,
12221224) -> io:: Result < ( libc:: attrlist , [ mem:: MaybeUninit < libc:: timespec > ; 3 ] , usize ) > {
You can’t perform that action at this time.
0 commit comments