You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-07-17 19:37:48 +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:
@ -87,7 +87,9 @@ fn preprocess() -> anyhow::Result<()> {
|
||||
}
|
||||
};
|
||||
// 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
|
||||
// we merged #1073) will have no frontmatter.
|
||||
if let Some(fundamentals) = courses.find_course("Fundamentals") {
|
||||
eprintln!(
|
||||
"Fundamentals: {}",
|
||||
timediff(fundamentals.minutes(), 8 * 3 * 60)
|
||||
@ -104,6 +106,7 @@ fn preprocess() -> anyhow::Result<()> {
|
||||
eprintln!(" {}: {}", segment.name, duration(segment.minutes()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
serde_json::to_writer(stdout(), &book)?;
|
||||
Ok(())
|
||||
|
Reference in New Issue
Block a user