Skip to content

Commit b67f57a

Browse files
incr. comp.: Fix test_timestamp_serialization so it does not overflow on some 32bit systems.
1 parent 004a7eb commit b67f57a

File tree

1 file changed

+2
-2
lines changed
  • src/librustc_incremental/persist

1 file changed

+2
-2
lines changed

src/librustc_incremental/persist/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -902,9 +902,9 @@ fn test_all_except_most_recent() {
902902
#[test]
903903
fn test_timestamp_serialization() {
904904
for i in 0 .. 1_000u64 {
905-
let time = UNIX_EPOCH + Duration::new(i * 3_434_578, (i as u32) * 239_000);
905+
let time = UNIX_EPOCH + Duration::new(i * 1_434_578, (i as u32) * 239_000);
906906
let s = timestamp_to_string(time);
907-
assert_eq!(time, string_to_timestamp(&s).unwrap());
907+
assert_eq!(Ok(time), string_to_timestamp(&s));
908908
}
909909
}
910910

0 commit comments

Comments
 (0)