@@ -7,7 +7,7 @@ use std::path::PathBuf;
77use std:: process:: { self , Command } ;
88use std:: str:: FromStr ;
99
10- use chrono:: { Date , DateTime , Duration , Utc } ;
10+ use chrono:: { Date , DateTime , Utc } ;
1111use colored:: * ;
1212use failure:: { bail, format_err, Fail , Error } ;
1313use log:: debug;
@@ -591,7 +591,7 @@ fn bisect(cfg: &Config, client: &Client) -> Result<(), Error> {
591591 let nightly_regression = & nightly_bisection_result. searched [ nightly_bisection_result. found ] ;
592592
593593 if let ToolchainSpec :: Nightly { date } = nightly_regression. spec {
594- let previous_date = date - chrono :: Duration :: days ( 1 ) ;
594+ let previous_date = date. pred ( ) ;
595595
596596 let working_commit = Bound :: Date ( previous_date) . sha ( ) ?;
597597 let bad_commit = Bound :: Date ( date) . sha ( ) ?;
@@ -998,7 +998,7 @@ fn bisect_nightlies(cfg: &Config, client: &Client) -> Result<BisectionResult, Er
998998 }
999999 Err ( InstallError :: NotFound { .. } ) => {
10001000 // go back just one day, presumably missing a nightly
1001- nightly_date = nightly_date - chrono :: Duration :: days ( 1 ) ;
1001+ nightly_date = nightly_date. pred ( ) ;
10021002 eprintln ! (
10031003 "*** unable to install {}. roll back one day and try again..." ,
10041004 t
@@ -1067,7 +1067,7 @@ fn toolchains_between(cfg: &Config, a: ToolchainSpec, b: ToolchainSpec) -> Vec<T
10671067 t. std_targets . sort ( ) ;
10681068 t. std_targets . dedup ( ) ;
10691069 toolchains. push ( t) ;
1070- date = date + Duration :: days ( 1 ) ;
1070+ date = date. succ ( ) ;
10711071 }
10721072 toolchains
10731073 }
0 commit comments