Skip to content

Commit 2bfb196

Browse files
authored
unhandled unwrap that I didn't expect to panic did panic -_- (#221)
1 parent 1b99726 commit 2bfb196

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/logging.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ impl log::Log for SimpleLogger {
2626
{
2727
// let t = Local::now();
2828
// let t_s = t.format("%Y-%m-%d %H:%M:%S.%f %z").to_string();
29-
let t = OffsetDateTime::now_local().unwrap();
29+
let t = OffsetDateTime::now_local().unwrap_or(OffsetDateTime::now_utc());
3030
let t_s = t.format(&FORMATTER).unwrap();
3131
println!("{} (Core {}) {}: {}", t_s, self.lcore_id, record.level(), s);
3232
}

0 commit comments

Comments
 (0)