File tree 1 file changed +2
-2
lines changed
library/std/src/sys/hermit
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ impl Timespec {
40
40
}
41
41
42
42
fn checked_add_duration ( & self , other : & Duration ) -> Option < Timespec > {
43
- let mut secs = self . tv_sec . checked_add_unsigned ( other. as_secs ( ) ) ?;
43
+ let mut secs = self . t . tv_sec . checked_add_unsigned ( other. as_secs ( ) ) ?;
44
44
45
45
// Nano calculations can't overflow because nanos are <1B which fit
46
46
// in a u32.
@@ -53,7 +53,7 @@ impl Timespec {
53
53
}
54
54
55
55
fn checked_sub_duration ( & self , other : & Duration ) -> Option < Timespec > {
56
- let mut secs = self . tv_sec . checked_sub_unsigned ( other. as_secs ( ) ) ?;
56
+ let mut secs = self . t . tv_sec . checked_sub_unsigned ( other. as_secs ( ) ) ?;
57
57
58
58
// Similar to above, nanos can't overflow.
59
59
let mut nsec = self . t . tv_nsec as i32 - other. subsec_nanos ( ) as i32 ;
You can’t perform that action at this time.
0 commit comments