mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-05-30 14:17:35 +02:00
Handle a missing "Fundamentals" course (#1509)
We need to work with translations which haven't yet been updated to use frontmatter.
This commit is contained in:
parent
6d19292f16
commit
3997a7d874
@ -87,21 +87,24 @@ fn preprocess() -> anyhow::Result<()> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// Print a summary of times for the "Fundamentals" course.
|
// Print a summary of times for the "Fundamentals" course.
|
||||||
let fundamentals = courses.find_course("Fundamentals").unwrap();
|
// Translations with a POT-Creation-Date before 2023-11-29 (when
|
||||||
eprintln!(
|
// we merged #1073) will have no frontmatter.
|
||||||
"Fundamentals: {}",
|
if let Some(fundamentals) = courses.find_course("Fundamentals") {
|
||||||
timediff(fundamentals.minutes(), 8 * 3 * 60)
|
|
||||||
);
|
|
||||||
|
|
||||||
eprintln!("Sessions:");
|
|
||||||
for session in fundamentals {
|
|
||||||
eprintln!(
|
eprintln!(
|
||||||
" {}: {}",
|
"Fundamentals: {}",
|
||||||
session.name,
|
timediff(fundamentals.minutes(), 8 * 3 * 60)
|
||||||
timediff(session.minutes(), 3 * 60)
|
|
||||||
);
|
);
|
||||||
for segment in session {
|
|
||||||
eprintln!(" {}: {}", segment.name, duration(segment.minutes()));
|
eprintln!("Sessions:");
|
||||||
|
for session in fundamentals {
|
||||||
|
eprintln!(
|
||||||
|
" {}: {}",
|
||||||
|
session.name,
|
||||||
|
timediff(session.minutes(), 3 * 60)
|
||||||
|
);
|
||||||
|
for segment in session {
|
||||||
|
eprintln!(" {}: {}", segment.name, duration(segment.minutes()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user