Skip to content

Commit

Permalink
Merge pull request #160 from epage/deprecated
Browse files Browse the repository at this point in the history
fix: Silence deprecation message
  • Loading branch information
epage authored Oct 28, 2024
2 parents 0b22d4d + 00a6327 commit a130157
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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 => {}
Expand Down Expand Up @@ -266,6 +269,7 @@ fn write_msg<P: AsRef<Path>>(
}

/// Utility function which will handle dumping information to disk
#[allow(deprecated)]
pub fn handle_dump(meta: &Metadata, panic_info: &PanicInfo<'_>) -> Option<PathBuf> {
let mut expl = String::new();

Expand Down

0 comments on commit a130157

Please sign in to comment.