Skip to content

Commit 348d684

Browse files
committed
pal/unsupported: Swap SystemTime::{MIN, MAX}
This commit fixes a bug in the pal for unsupported systems with regard to `SystemTime`, namely that the values of `SystemTime::MIN` and `SystemTime::MAX` were wrong in the sense that they were swapped, i.e. the minimum representing the maximum and the maximum representing the minimum.
1 parent fa5a62e commit 348d684

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

library/std/src/sys/pal/unsupported/time.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ impl Instant {
2727
}
2828

2929
impl SystemTime {
30-
pub const MAX: SystemTime = Duration::ZERO;
30+
pub const MAX: SystemTime = Duration::MAX;
3131

32-
pub const MIN: SystemTime = Duration::MAX;
32+
pub const MIN: SystemTime = Duration::ZERO;
3333

3434
pub fn now() -> SystemTime {
3535
panic!("time not implemented on this platform")

0 commit comments

Comments
 (0)