Update deprecated use of PanicInfo to PanicHookInfo (#34659)

Signed-off-by: Narfinger <Narfinger@users.noreply.github.com>
This commit is contained in:
Narfinger 2024-12-17 12:50:26 +09:00 committed by GitHub
parent 60d8d5a841
commit 4ddcba240b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,7 +6,7 @@
use std::f32::INFINITY;
use std::ops::Range;
use std::panic::{self, PanicInfo};
use std::panic::{self, PanicHookInfo};
use std::sync::{Mutex, MutexGuard};
use std::{thread, u32};
@ -28,7 +28,7 @@ static PANIC_HOOK_MUTEX: Mutex<()> = Mutex::new(());
struct PanicMsgSuppressor<'a> {
#[allow(dead_code)]
mutex_guard: MutexGuard<'a, ()>,
prev_hook: Option<Box<dyn Fn(&PanicInfo<'_>) + 'static + Sync + Send>>,
prev_hook: Option<Box<dyn Fn(&PanicHookInfo<'_>) + 'static + Sync + Send>>,
}
impl<'a> PanicMsgSuppressor<'a> {