Skip to content

Commit

Permalink
Fix build error on stable rust
Browse files Browse the repository at this point in the history
  • Loading branch information
cohaereo committed Aug 31, 2024
1 parent c863cf5 commit 23adebd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions crates/alkahest-panic-handler/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
// TODO(cohae): Remove this once PanicHookInfo becomes stable (and update MSRV)
#![allow(deprecated)]

use std::{
backtrace::{Backtrace, BacktraceStatus},
io::Write,
panic::PanicHookInfo,
panic::PanicInfo,
sync::{Arc, OnceLock},
};

Expand Down Expand Up @@ -64,7 +67,7 @@ pub fn install_hook(header: Option<String>) {
}
}

fn write_panic_to_file(info: &PanicHookInfo<'_>, bt: Backtrace) -> std::io::Result<()> {
fn write_panic_to_file(info: &PanicInfo<'_>, bt: Backtrace) -> std::io::Result<()> {
let mut file_lock = PANIC_FILE.lock();
if file_lock.is_none() {
*file_lock = Some(fs_err::File::create("panic.log")?);
Expand Down

0 comments on commit 23adebd

Please sign in to comment.