From 1dc3dbc79f19ee44c0f33e5faf9d4122d42b62ee Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 26 Dec 2025 10:21:03 -0600 Subject: [PATCH] refactor: Remove deprecated API --- src/lib.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e9e6994..a6d09f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,8 +53,7 @@ use report::{Method, Report}; use std::borrow::Cow; use std::io::Result as IoResult; -#[allow(deprecated)] -use std::panic::PanicInfo; +use std::panic::PanicHookInfo; use std::path::{Path, PathBuf}; /// A convenient metadata struct that describes a crate @@ -163,7 +162,7 @@ pub fn setup_panic(meta: impl Fn() -> Metadata) { PanicStyle::Human => { let meta = meta(); - panic::set_hook(Box::new(move |info: &PanicInfo<'_>| { + panic::set_hook(Box::new(move |info: &PanicHookInfo<'_>| { let file_path = handle_dump(&meta, info); print_msg(file_path, &meta) .expect("human-panic: printing error message to console failed"); @@ -273,7 +272,7 @@ fn write_msg>( /// Utility function which will handle dumping information to disk #[allow(deprecated)] -pub fn handle_dump(meta: &Metadata, panic_info: &PanicInfo<'_>) -> Option { +pub fn handle_dump(meta: &Metadata, panic_info: &PanicHookInfo<'_>) -> Option { let mut expl = String::new(); let message = match (