Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ac5ffa5

Browse files
Rollup merge of rust-lang#123057 - sthibaul:systemtime, r=jhpratt
unix fs: Make hurd using explicit new rather than From 408c0ea ("unix time module now return result") dropped the From impl for SystemTime, breaking the hurd build (and probably the horizon build) Fixes rust-lang#123032
2 parents b8e8d65 + 7b4e507 commit ac5ffa5

File tree

1 file changed

+2
-2
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+2
-2
lines changed

‎library/std/src/sys/pal/unix/fs.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ impl FileAttr {
517517

518518
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
519519
pub fn modified(&self) -> io::Result<SystemTime> {
520-
Ok(SystemTime::from(self.stat.st_mtim))
520+
SystemTime::new(self.stat.st_mtim.tv_secasi64,self.stat.st_mtim.tv_nsecasi64)
521521
}
522522

523523
#[cfg(not(any(
@@ -545,7 +545,7 @@ impl FileAttr {
545545

546546
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
547547
pub fn accessed(&self) -> io::Result<SystemTime> {
548-
Ok(SystemTime::from(self.stat.st_atim))
548+
SystemTime::new(self.stat.st_atim.tv_secasi64,self.stat.st_atim.tv_nsecasi64)
549549
}
550550

551551
#[cfg(any(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /