Skip to content

Commit 8760d29

Browse files
committed
std: Fix {atime,mtime,ctime}_nsec accessors
These all had a typo where they were accessing the seconds field, not the nanoseconds field.
1 parent f3345cb commit 8760d29

File tree

1 file changed

+3
-3
lines changed
  • src/libstd/sys/unix/ext

1 file changed

+3
-3
lines changed

src/libstd/sys/unix/ext/fs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,11 @@ impl Metadata {
138138
pub fn rdev(&self) -> raw::dev_t { self.0.raw().st_rdev as raw::dev_t }
139139
pub fn size(&self) -> raw::off_t { self.0.raw().st_size as raw::off_t }
140140
pub fn atime(&self) -> raw::time_t { self.0.raw().st_atime }
141-
pub fn atime_nsec(&self) -> c_long { self.0.raw().st_atime }
141+
pub fn atime_nsec(&self) -> c_long { self.0.raw().st_atime_nsec }
142142
pub fn mtime(&self) -> raw::time_t { self.0.raw().st_mtime }
143-
pub fn mtime_nsec(&self) -> c_long { self.0.raw().st_mtime }
143+
pub fn mtime_nsec(&self) -> c_long { self.0.raw().st_mtime_nsec }
144144
pub fn ctime(&self) -> raw::time_t { self.0.raw().st_ctime }
145-
pub fn ctime_nsec(&self) -> c_long { self.0.raw().st_ctime }
145+
pub fn ctime_nsec(&self) -> c_long { self.0.raw().st_ctime_nsec }
146146

147147
pub fn blksize(&self) -> raw::blksize_t {
148148
self.0.raw().st_blksize as raw::blksize_t

0 commit comments

Comments
 (0)