]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys/unix/fs.rs
Rollup merge of #97908 - iago-lito:stabilize_nonzero_checked_ops_constness, r=scottmcm
[rust.git] / library / std / src / sys / unix / fs.rs
index 4dda3c3f8133d7a5c498034d2b7f5b2c5e5d4853..8b0bbd6a55c6bb2e7e8d4aebbb5a1f7509d8f842 100644 (file)
@@ -429,11 +429,16 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
         Ok(SystemTime::new(self.stat.st_atime as i64, self.stat.st_atime_nsec as i64))
     }
 
-    #[cfg(any(target_os = "vxworks", target_os = "espidf", target_os = "horizon"))]
+    #[cfg(any(target_os = "vxworks", target_os = "espidf"))]
     pub fn accessed(&self) -> io::Result<SystemTime> {
         Ok(SystemTime::new(self.stat.st_atime as i64, 0))
     }
 
+    #[cfg(target_os = "horizon")]
+    pub fn accessed(&self) -> io::Result<SystemTime> {
+        Ok(SystemTime::from(self.stat.st_atim))
+    }
+
     #[cfg(any(
         target_os = "freebsd",
         target_os = "openbsd",