mirror of
https://github.com/rust-lang/rust
synced 2024-10-02 23:04:50 +00:00
Rollup merge of #123057 - sthibaul:systemtime, r=jhpratt
unix fs: Make hurd using explicit new rather than From
408c0ea216
("unix time module now return result") dropped the From impl for SystemTime, breaking the hurd build (and probably the horizon build)
Fixes #123032
This commit is contained in:
commit
ac5ffa51cd
|
@ -517,7 +517,7 @@ pub fn modified(&self) -> io::Result<SystemTime> {
|
|||
|
||||
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
|
||||
pub fn modified(&self) -> io::Result<SystemTime> {
|
||||
Ok(SystemTime::from(self.stat.st_mtim))
|
||||
SystemTime::new(self.stat.st_mtim.tv_sec as i64, self.stat.st_mtim.tv_nsec as i64)
|
||||
}
|
||||
|
||||
#[cfg(not(any(
|
||||
|
@ -545,7 +545,7 @@ pub fn accessed(&self) -> io::Result<SystemTime> {
|
|||
|
||||
#[cfg(any(target_os = "horizon", target_os = "hurd"))]
|
||||
pub fn accessed(&self) -> io::Result<SystemTime> {
|
||||
Ok(SystemTime::from(self.stat.st_atim))
|
||||
SystemTime::new(self.stat.st_atim.tv_sec as i64, self.stat.st_atim.tv_nsec as i64)
|
||||
}
|
||||
|
||||
#[cfg(any(
|
||||
|
|
Loading…
Reference in a new issue