handle first-time run with no arguments
This commit is contained in:
parent
8c455f58a0
commit
64c077b168
1 changed files with 4 additions and 1 deletions
|
@ -76,7 +76,10 @@ fn log_single(start: SystemTime) -> Option<()> {
|
|||
}
|
||||
|
||||
fn print_day() -> Option<()> {
|
||||
let history = fs::read_to_string("compiler_history.txt").unwrap_or_default();
|
||||
let Ok(history) = fs::read_to_string("compiler_history.txt") else {
|
||||
println!("No history in this directory.");
|
||||
return None;
|
||||
};
|
||||
|
||||
let mut wasted_total = 0;
|
||||
let mut by_day = Vec::new();
|
||||
|
|
Loading…
Reference in a new issue