Fixed Begin/End error handling

This commit is contained in:
Trey Blancher 2022-12-21 12:48:46 -05:00
parent 8aae65e3c6
commit e63e467f4a
1 changed files with 4 additions and 1 deletions

View File

@ -85,7 +85,10 @@ pub mod timetracking {
let mut gtoth: f64 = 0.0;
for (act, tstamps) in start.iter_mut().sorted_by_key(|x| x.0) {
let bc: i64 = tstamps.len().try_into().unwrap();
let ec: i64 = finish.get(&act.to_string()).expect("Somehow, not a vector!").len().try_into().unwrap();
let mut ec: i64 = 0;
if finish.contains_key(&act.to_string()) {
ec = finish.get(&act.to_string()).expect("Somehow, not a vector!").len().try_into().unwrap();
};
// Debugging
// println!("bc: {}, ec: {}", bc, ec);