From 00a63278dac5f7032e0fc9fe57ee132334b42bc7 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 28 Oct 2024 09:46:59 -0500 Subject: [PATCH] fix: Silence deprecation message We can't properly fix this until our MSRV is bumped to 1.81 Fixes #159 --- src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 10550d1..fb9a2aa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,6 +50,7 @@ use report::{Method, Report}; use std::borrow::Cow; use std::io::Result as IoResult; +#[allow(deprecated)] use std::panic::PanicInfo; use std::path::{Path, PathBuf}; @@ -149,8 +150,10 @@ macro_rules! setup_panic { #[doc(hidden)] pub fn setup_panic(meta: impl Fn() -> Metadata) { + #![allow(deprecated)] + #[allow(unused_imports)] - use std::panic::{self, PanicInfo}; + use std::panic; match PanicStyle::default() { PanicStyle::Debug => {} @@ -266,6 +269,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 { let mut expl = String::new();