Skip to content

Commit 20641b5

Browse files
committed
Alpha-rename Date<Utc> to GitDate.
1 parent c74f766 commit 20641b5

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/main.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,12 @@ struct Opts {
166166
script: Option<PathBuf>,
167167
}
168168

169+
pub type GitDate = Date<Utc>;
170+
169171
#[derive(Clone, Debug)]
170172
enum Bound {
171173
Commit(String),
172-
Date(Date<Utc>),
174+
Date(GitDate),
173175
}
174176

175177
#[derive(Fail, Debug)]
@@ -235,7 +237,7 @@ struct Toolchain {
235237
#[derive(Clone, PartialEq, Eq, Debug)]
236238
enum ToolchainSpec {
237239
Ci { commit: String, alt: bool },
238-
Nightly { date: Date<Utc> },
240+
Nightly { date: GitDate },
239241
}
240242

241243
impl fmt::Display for ToolchainSpec {
@@ -447,7 +449,7 @@ enum TestOutcome {
447449
impl Toolchain {
448450
/// This returns the date of the default toolchain, if it is a nightly toolchain.
449451
/// Returns `None` if the installed toolchain is not a nightly toolchain.
450-
fn default_nightly() -> Option<Date<Utc>> {
452+
fn default_nightly() -> Option<GitDate> {
451453
let version_meta = rustc_version::version_meta().unwrap();
452454

453455
if let Channel::Nightly = version_meta.channel {
@@ -1160,12 +1162,12 @@ fn print_final_report(
11601162
}
11611163

11621164
struct NightlyFinderIter {
1163-
start_date: Date<Utc>,
1164-
current_date: Date<Utc>,
1165+
start_date: GitDate,
1166+
current_date: GitDate,
11651167
}
11661168

11671169
impl NightlyFinderIter {
1168-
fn new(start_date: Date<Utc>) -> Self {
1170+
fn new(start_date: GitDate) -> Self {
11691171
Self {
11701172
start_date,
11711173
current_date: start_date,
@@ -1174,9 +1176,9 @@ impl NightlyFinderIter {
11741176
}
11751177

11761178
impl Iterator for NightlyFinderIter {
1177-
type Item = Date<Utc>;
1179+
type Item = GitDate;
11781180

1179-
fn next(&mut self) -> Option<Date<Utc>> {
1181+
fn next(&mut self) -> Option<GitDate> {
11801182
let current_distance = self.start_date - self.current_date;
11811183

11821184
let jump_length =

0 commit comments

Comments
 (0)