fixed bug hayabusa crashes when level is not valid (#562)

* fixed undefined level unwarp panic bug #560

* updated changelog #560
This commit is contained in:
DustInDark
2022-06-03 11:55:22 +09:00
committed by GitHub
parent 2dcf960d51
commit 39468d3b06
3 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -294,7 +294,7 @@ fn emit_csv<W: std::io::Write>(
let time_str_date = &time_str[0..10];
let mut detect_counts_by_date = detect_counts_by_date_and_level
.get(&detect_info.level.to_lowercase())
.unwrap()
.unwrap_or_else(|| detect_counts_by_date_and_level.get("undefined").unwrap())
.clone();
*detect_counts_by_date
.entry(time_str_date.to_string())