Skip to content

Commit

Permalink
ROVER-245 Removing deprecated PanicInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Nov 24, 2024
1 parent 1077288 commit 6f3ff79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crates/robot-panic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ macro_rules! setup_panic {
#[cfg(not(debug_assertions))]
match ::std::env::var("RUST_BACKTRACE") {
Err(_) => {
panic::set_hook(Box::new(move |info: &PanicInfo| {
panic::set_hook(Box::new(move |info: &PanicHookInfo| {
let crash_report = get_report(&$meta, info);
print_msg(&crash_report, &$meta)
.expect("robot-panic: printing error message to console failed");
Expand All @@ -105,7 +105,7 @@ macro_rules! setup_panic {

() => {
#[allow(unused_imports)]
use std::panic::{self, PanicInfo};
use std::panic::{self, PanicHookInfo};
#[allow(unused_imports)]
use $crate::{get_report, print_msg, Metadata};

Expand All @@ -120,7 +120,7 @@ macro_rules! setup_panic {
repository: env!("CARGO_PKG_REPOSITORY").into(),
};

panic::set_hook(Box::new(move |info: &PanicInfo| {
panic::set_hook(Box::new(move |info: &PanicHookInfo| {
let crash_report = get_report(&meta, info);
print_msg(&crash_report, &meta)
.expect("robot-panic: printing error message to console failed");
Expand Down

0 comments on commit 6f3ff79

Please sign in to comment.