File tree Expand file tree Collapse file tree 1 file changed +11
-22
lines changed Expand file tree Collapse file tree 1 file changed +11
-22
lines changed Original file line number Diff line number Diff line change @@ -646,29 +646,18 @@ fn update_from_dist_<'a>(
646
646
// try is _older_ than the current nightly, since we know that the user's current
647
647
// nightlys supports the components they have installed, and thus would always
648
648
// terminate the search.
649
- if let Some ( ref mut date) = toolchain. date {
650
- // recurse
651
- toolchain. date = Some (
652
- Utc . from_utc_date (
653
- & NaiveDate :: parse_from_str ( date, "%Y-%m-%d" )
654
- . expect ( "we constructed this date string below" ) ,
649
+ toolchain. date = Some (
650
+ Utc . from_utc_date (
651
+ & NaiveDate :: parse_from_str (
652
+ toolchain. date . as_ref ( ) . unwrap_or ( & fetched) ,
653
+ "%Y-%m-%d" ,
655
654
)
656
- . pred ( )
657
- . format ( "%Y-%m-%d" )
658
- . to_string ( ) ,
659
- ) ;
660
- } else {
661
- // Pick a nightly that is one day older than the latest.
662
- toolchain. date = Some (
663
- Utc . from_utc_date (
664
- & NaiveDate :: parse_from_str ( & fetched, "%Y-%m-%d" )
665
- . expect ( "manifest carries invalid date" ) ,
666
- )
667
- . pred ( )
668
- . format ( "%Y-%m-%d" )
669
- . to_string ( ) ,
670
- ) ;
671
- }
655
+ . expect ( "Malformed manifest date" ) ,
656
+ )
657
+ . pred ( )
658
+ . format ( "%Y-%m-%d" )
659
+ . to_string ( ) ,
660
+ ) ;
672
661
}
673
662
}
674
663
}
You can’t perform that action at this time.
0 commit comments