@@ -166,10 +166,12 @@ struct Opts {
166
166
script : Option < PathBuf > ,
167
167
}
168
168
169
+ pub type GitDate = Date < Utc > ;
170
+
169
171
#[ derive( Clone , Debug ) ]
170
172
enum Bound {
171
173
Commit ( String ) ,
172
- Date ( Date < Utc > ) ,
174
+ Date ( GitDate ) ,
173
175
}
174
176
175
177
#[ derive( Fail , Debug ) ]
@@ -235,7 +237,7 @@ struct Toolchain {
235
237
#[ derive( Clone , PartialEq , Eq , Debug ) ]
236
238
enum ToolchainSpec {
237
239
Ci { commit : String , alt : bool } ,
238
- Nightly { date : Date < Utc > } ,
240
+ Nightly { date : GitDate } ,
239
241
}
240
242
241
243
impl fmt:: Display for ToolchainSpec {
@@ -447,7 +449,7 @@ enum TestOutcome {
447
449
impl Toolchain {
448
450
/// This returns the date of the default toolchain, if it is a nightly toolchain.
449
451
/// Returns `None` if the installed toolchain is not a nightly toolchain.
450
- fn default_nightly ( ) -> Option < Date < Utc > > {
452
+ fn default_nightly ( ) -> Option < GitDate > {
451
453
let version_meta = rustc_version:: version_meta ( ) . unwrap ( ) ;
452
454
453
455
if let Channel :: Nightly = version_meta. channel {
@@ -1160,12 +1162,12 @@ fn print_final_report(
1160
1162
}
1161
1163
1162
1164
struct NightlyFinderIter {
1163
- start_date : Date < Utc > ,
1164
- current_date : Date < Utc > ,
1165
+ start_date : GitDate ,
1166
+ current_date : GitDate ,
1165
1167
}
1166
1168
1167
1169
impl NightlyFinderIter {
1168
- fn new ( start_date : Date < Utc > ) -> Self {
1170
+ fn new ( start_date : GitDate ) -> Self {
1169
1171
Self {
1170
1172
start_date,
1171
1173
current_date : start_date,
@@ -1174,9 +1176,9 @@ impl NightlyFinderIter {
1174
1176
}
1175
1177
1176
1178
impl Iterator for NightlyFinderIter {
1177
- type Item = Date < Utc > ;
1179
+ type Item = GitDate ;
1178
1180
1179
- fn next ( & mut self ) -> Option < Date < Utc > > {
1181
+ fn next ( & mut self ) -> Option < GitDate > {
1180
1182
let current_distance = self . start_date - self . current_date ;
1181
1183
1182
1184
let jump_length =
0 commit comments