refactor: remove panic-prone unwrap and expect calls

This commit is contained in:
lbl
2026-08-23 12:04:40 +08:00
parent 2100ec1ca5
commit c2fd1ff870
18 changed files with 161 additions and 128 deletions
+1 -1
View File
@@ -285,5 +285,5 @@ pub fn ts_to_string(ts_secs: i64) -> String {
};
let dt_local = dt.to_offset(local_offset);
let format = format_description!("[year]-[month]-[day] [hour]:[minute]:[second]");
dt_local.format(&format).unwrap()
dt_local.format(&format).unwrap_or_default()
}