55// http://opensource.org/licenses/MIT>, at your option. This file may not be
66// copied, modified, or distributed except according to those terms.
77
8- extern crate chrono;
9- extern crate dialoguer;
10- extern crate dirs;
11- extern crate env_logger;
12- #[ macro_use]
13- extern crate failure;
14- extern crate flate2;
15- extern crate git2;
16- #[ macro_use]
17- extern crate log;
18- extern crate pbr;
19- #[ cfg( test) ]
20- extern crate quickcheck;
21- extern crate regex;
22- extern crate reqwest;
23- extern crate rustc_version;
24- extern crate structopt;
25- extern crate tar;
26- extern crate tee;
27- extern crate tempdir;
28- extern crate xz2;
29-
308use std:: env;
319use std:: ffi:: OsString ;
3210use std:: fmt;
@@ -38,8 +16,9 @@ use std::str::FromStr;
3816
3917use chrono:: { Date , Duration , naive, Utc } ;
4018use dialoguer:: Select ;
41- use failure:: Error ;
19+ use failure:: { bail , format_err , Fail , Error } ;
4220use flate2:: read:: GzDecoder ;
21+ use log:: debug;
4322use pbr:: { ProgressBar , Units } ;
4423use regex:: Regex ;
4524use reqwest:: header:: CONTENT_LENGTH ;
@@ -51,6 +30,11 @@ use tee::TeeReader;
5130use tempdir:: TempDir ;
5231use xz2:: read:: XzDecoder ;
5332
33+ mod git;
34+ mod least_satisfying;
35+
36+ use crate :: least_satisfying:: { least_satisfying, Satisfies } ;
37+
5438/// The first commit which build artifacts are made available through the CI for
5539/// bisection.
5640///
@@ -62,10 +46,6 @@ const EPOCH_COMMIT: &str = "927c55d86b0be44337f37cf5b0a76fb8ba86e06c";
6246const NIGHTLY_SERVER : & str = "https://static.rust-lang.org/dist" ;
6347const CI_SERVER : & str = "https://s3-us-west-1.amazonaws.com/rust-lang-ci2" ;
6448
65- mod git;
66- mod least_satisfying;
67- use least_satisfying:: { least_satisfying, Satisfies } ;
68-
6949fn get_commits ( start : & str , end : & str ) -> Result < Vec < git:: Commit > , Error > {
7050 eprintln ! ( "fetching commits from {} to {}" , start, end) ;
7151 let commits = git:: get_commits_between ( start, end) ?;
@@ -233,7 +213,7 @@ impl Opts {
233213struct ExitError ( i32 ) ;
234214
235215impl fmt:: Display for ExitError {
236- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
216+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
237217 write ! ( f, "exiting with {}" , self . 0 )
238218 }
239219}
@@ -252,7 +232,7 @@ enum ToolchainSpec {
252232}
253233
254234impl fmt:: Display for ToolchainSpec {
255- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
235+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
256236 match * self {
257237 ToolchainSpec :: Ci { ref commit, alt } => {
258238 let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
@@ -280,7 +260,7 @@ impl Toolchain {
280260}
281261
282262impl fmt:: Display for Toolchain {
283- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
263+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
284264 match self . spec {
285265 ToolchainSpec :: Ci { ref commit, alt } => {
286266 let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
0 commit comments