5
5
// http://opensource.org/licenses/MIT>, at your option. This file may not be
6
6
// copied, modified, or distributed except according to those terms.
7
7
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
-
30
8
use std:: env;
31
9
use std:: ffi:: OsString ;
32
10
use std:: fmt;
@@ -38,8 +16,9 @@ use std::str::FromStr;
38
16
39
17
use chrono:: { Date , Duration , naive, Utc } ;
40
18
use dialoguer:: Select ;
41
- use failure:: Error ;
19
+ use failure:: { bail , format_err , Fail , Error } ;
42
20
use flate2:: read:: GzDecoder ;
21
+ use log:: debug;
43
22
use pbr:: { ProgressBar , Units } ;
44
23
use regex:: Regex ;
45
24
use reqwest:: header:: CONTENT_LENGTH ;
@@ -51,6 +30,11 @@ use tee::TeeReader;
51
30
use tempdir:: TempDir ;
52
31
use xz2:: read:: XzDecoder ;
53
32
33
+ mod git;
34
+ mod least_satisfying;
35
+
36
+ use crate :: least_satisfying:: { least_satisfying, Satisfies } ;
37
+
54
38
/// The first commit which build artifacts are made available through the CI for
55
39
/// bisection.
56
40
///
@@ -62,10 +46,6 @@ const EPOCH_COMMIT: &str = "927c55d86b0be44337f37cf5b0a76fb8ba86e06c";
62
46
const NIGHTLY_SERVER : & str = "https://static.rust-lang.org/dist" ;
63
47
const CI_SERVER : & str = "https://s3-us-west-1.amazonaws.com/rust-lang-ci2" ;
64
48
65
- mod git;
66
- mod least_satisfying;
67
- use least_satisfying:: { least_satisfying, Satisfies } ;
68
-
69
49
fn get_commits ( start : & str , end : & str ) -> Result < Vec < git:: Commit > , Error > {
70
50
eprintln ! ( "fetching commits from {} to {}" , start, end) ;
71
51
let commits = git:: get_commits_between ( start, end) ?;
@@ -233,7 +213,7 @@ impl Opts {
233
213
struct ExitError ( i32 ) ;
234
214
235
215
impl fmt:: Display for ExitError {
236
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
216
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
237
217
write ! ( f, "exiting with {}" , self . 0 )
238
218
}
239
219
}
@@ -252,7 +232,7 @@ enum ToolchainSpec {
252
232
}
253
233
254
234
impl fmt:: Display for ToolchainSpec {
255
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
235
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
256
236
match * self {
257
237
ToolchainSpec :: Ci { ref commit, alt } => {
258
238
let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
@@ -280,7 +260,7 @@ impl Toolchain {
280
260
}
281
261
282
262
impl fmt:: Display for Toolchain {
283
- fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
263
+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
284
264
match self . spec {
285
265
ToolchainSpec :: Ci { ref commit, alt } => {
286
266
let alt_s = if alt { format ! ( "-alt" ) } else { String :: new ( ) } ;
0 commit comments