Skip to content

Commit 9b9a4e9

Browse files
committed
---
yaml --- r: 127735 b: refs/heads/snap-stage3 c: 51e9728 h: refs/heads/master i: 127733: 502834b 127731: d2275fc 127727: 52aac4d v: v3
1 parent 7b7b20c commit 9b9a4e9

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 49a970f2449a78f28b6c301e542d38593094ca77
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6cb2093f7496a2539e343677b6f7f5dd2fa5f091
4+
refs/heads/snap-stage3: 51e9728292ec4b89de095e2f0c2e92aa60927a88
55
refs/heads/try: d9c23fcbaea89871667272a67ecb8d3a512162f3
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/time.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ pub struct Duration {
4444
}
4545

4646
/// The minimum possible `Duration`.
47-
pub static MIN: Duration = Duration { days: MIN_DAYS, secs: 0, nanos: 0 };
47+
pub static MIN_DURATION: Duration = Duration { days: MIN_DAYS, secs: 0, nanos: 0 };
4848
/// The maximum possible `Duration`.
49-
pub static MAX: Duration = Duration { days: MAX_DAYS, secs: SECS_PER_DAY as u32 - 1,
49+
pub static MAX_DURATION: Duration = Duration { days: MAX_DAYS, secs: SECS_PER_DAY as u32 - 1,
5050
nanos: NANOS_PER_SEC as u32 - 1 };
5151

5252
impl Duration {
@@ -280,8 +280,8 @@ impl Duration {
280280
}
281281

282282
impl num::Bounded for Duration {
283-
#[inline] fn min_value() -> Duration { MIN }
284-
#[inline] fn max_value() -> Duration { MAX }
283+
#[inline] fn min_value() -> Duration { MIN_DURATION }
284+
#[inline] fn max_value() -> Duration { MAX_DURATION }
285285
}
286286

287287
impl num::Zero for Duration {
@@ -502,7 +502,7 @@ fn div_rem_64(this: i64, other: i64) -> (i64, i64) {
502502

503503
#[cfg(test)]
504504
mod tests {
505-
use super::{Duration, MIN_DAYS, MAX_DAYS, MIN, MAX};
505+
use super::{Duration, MIN_DAYS, MAX_DAYS, MIN_DURATION, MAX_DURATION};
506506
use std::{i32, i64};
507507

508508
#[test]
@@ -534,8 +534,8 @@ mod tests {
534534
assert_eq!(Duration::new(-1, -2, -3_004_005).num_days(), -1);
535535
assert_eq!(Duration::days(i32::MAX).num_days(), i32::MAX);
536536
assert_eq!(Duration::days(i32::MIN).num_days(), i32::MIN);
537-
assert_eq!(MAX.num_days(), MAX_DAYS);
538-
assert_eq!(MIN.num_days(), MIN_DAYS);
537+
assert_eq!(MAX_DURATION.num_days(), MAX_DAYS);
538+
assert_eq!(MIN_DURATION.num_days(), MIN_DAYS);
539539
}
540540

541541
#[test]
@@ -551,8 +551,8 @@ mod tests {
551551
assert_eq!(Duration::new(-1, -2, -3_004_005).num_seconds(), -86402);
552552
assert_eq!(Duration::seconds(i32::MAX).num_seconds(), i32::MAX as i64);
553553
assert_eq!(Duration::seconds(i32::MIN).num_seconds(), i32::MIN as i64);
554-
assert_eq!(MAX.num_seconds(), (MAX_DAYS as i64 + 1) * 86400 - 1);
555-
assert_eq!(MIN.num_seconds(), MIN_DAYS as i64 * 86400);
554+
assert_eq!(MAX_DURATION.num_seconds(), (MAX_DAYS as i64 + 1) * 86400 - 1);
555+
assert_eq!(MIN_DURATION.num_seconds(), MIN_DAYS as i64 * 86400);
556556
}
557557

558558
#[test]
@@ -568,8 +568,8 @@ mod tests {
568568
assert_eq!(Duration::new(-1, -2, -3_004_005).num_milliseconds(), -86402_003);
569569
assert_eq!(Duration::milliseconds(i32::MAX).num_milliseconds(), i32::MAX as i64);
570570
assert_eq!(Duration::milliseconds(i32::MIN).num_milliseconds(), i32::MIN as i64);
571-
assert_eq!(MAX.num_milliseconds(), (MAX_DAYS as i64 + 1) * 86400_000 - 1);
572-
assert_eq!(MIN.num_milliseconds(), MIN_DAYS as i64 * 86400_000);
571+
assert_eq!(MAX_DURATION.num_milliseconds(), (MAX_DAYS as i64 + 1) * 86400_000 - 1);
572+
assert_eq!(MIN_DURATION.num_milliseconds(), MIN_DAYS as i64 * 86400_000);
573573
}
574574

575575
#[test]
@@ -585,8 +585,8 @@ mod tests {
585585
assert_eq!(Duration::new(-1, -2, -3_004_005).num_microseconds(), Some(-86402_003_004));
586586
assert_eq!(Duration::microseconds(i32::MAX).num_microseconds(), Some(i32::MAX as i64));
587587
assert_eq!(Duration::microseconds(i32::MIN).num_microseconds(), Some(i32::MIN as i64));
588-
assert_eq!(MAX.num_microseconds(), None);
589-
assert_eq!(MIN.num_microseconds(), None);
588+
assert_eq!(MAX_DURATION.num_microseconds(), None);
589+
assert_eq!(MIN_DURATION.num_microseconds(), None);
590590

591591
// overflow checks
592592
static MICROS_PER_DAY: i64 = 86400_000_000;
@@ -607,8 +607,8 @@ mod tests {
607607
assert_eq!(Duration::new(-1, -2, -3_004_005).num_nanoseconds(), Some(-86402_003_004_005));
608608
assert_eq!(Duration::nanoseconds(i32::MAX).num_nanoseconds(), Some(i32::MAX as i64));
609609
assert_eq!(Duration::nanoseconds(i32::MIN).num_nanoseconds(), Some(i32::MIN as i64));
610-
assert_eq!(MAX.num_nanoseconds(), None);
611-
assert_eq!(MIN.num_nanoseconds(), None);
610+
assert_eq!(MAX_DURATION.num_nanoseconds(), None);
611+
assert_eq!(MIN_DURATION.num_nanoseconds(), None);
612612

613613
// overflow checks
614614
static NANOS_PER_DAY: i64 = 86400_000_000_000;

0 commit comments

Comments
 (0)