Skip to content

Commit

Permalink
chore: Adhere to type rename
Browse files Browse the repository at this point in the history
from `std::panic::PanicInfo` to `std::panic::PanicHookInfo`, which was
introduced in Rust 1.81.0. For additional information, see:

- https://releases.rs/docs/1.81.0/#compatibility-notes
- rust-lang/rust#115974
  • Loading branch information
har7an committed Jan 19, 2025
1 parent b2c86dd commit 260be7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion zellij-tile/src/shim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ pub fn go_to_previous_tab() {
unsafe { host_run_plugin_command() };
}

pub fn report_panic(info: &std::panic::PanicInfo) {
pub fn report_panic(info: &std::panic::PanicHookInfo) {
let panic_payload = if let Some(s) = info.payload().downcast_ref::<&str>() {
format!("{}", s)
} else {
Expand Down
4 changes: 2 additions & 2 deletions zellij-utils/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ mod not_wasm {
use super::*;
use crate::channels::{SenderWithContext, ASYNCOPENCALLS, OPENCALLS};
use miette::{Diagnostic, GraphicalReportHandler, GraphicalTheme, Report};
use std::panic::PanicInfo;
use std::panic::PanicHookInfo;
use thiserror::Error as ThisError;

/// The maximum amount of calls an [`ErrorContext`] will keep track
Expand Down Expand Up @@ -651,7 +651,7 @@ mod not_wasm {
}

/// Custom panic handler/hook. Prints the [`ErrorContext`].
pub fn handle_panic<T>(info: &PanicInfo<'_>, sender: &SenderWithContext<T>)
pub fn handle_panic<T>(info: &PanicHookInfo<'_>, sender: &SenderWithContext<T>)
where
T: ErrorInstruction + Clone,
{
Expand Down

0 comments on commit 260be7f

Please # to comment.