From ac30e4cf926b20e5601307f9e10fa76e472e77e8 Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Tue, 4 Mar 2025 11:03:18 +0100 Subject: [PATCH] uucore: replace PanicInfo with PanicHookInfo --- src/uucore/src/lib/mods/panic.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/uucore/src/lib/mods/panic.rs b/src/uucore/src/lib/mods/panic.rs index 9340c4f40..8c170b3c8 100644 --- a/src/uucore/src/lib/mods/panic.rs +++ b/src/uucore/src/lib/mods/panic.rs @@ -13,15 +13,10 @@ //! $ seq inf | head -n 1 //! ``` //! -use std::panic; -// TODO: use PanicHookInfo when we have a MSRV of 1.81 -#[allow(deprecated)] -use std::panic::PanicInfo; +use std::panic::{self, PanicHookInfo}; /// Decide whether a panic was caused by a broken pipe (SIGPIPE) error. -// TODO: use PanicHookInfo when we have a MSRV of 1.81 -#[allow(deprecated)] -fn is_broken_pipe(info: &PanicInfo) -> bool { +fn is_broken_pipe(info: &PanicHookInfo) -> bool { if let Some(res) = info.payload().downcast_ref::() { if res.contains("BrokenPipe") || res.contains("Broken pipe") { return true;