mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #6792 from cakebaker/uucore_allow_deprecated
uucore: allow use of deprecated `PanicInfo`
This commit is contained in:
commit
93c3d004d7
1 changed files with 4 additions and 0 deletions
|
@ -14,9 +14,13 @@
|
|||
//! ```
|
||||
//!
|
||||
use std::panic;
|
||||
// TODO: use PanicHookInfo when we have a MSRV of 1.81
|
||||
#[allow(deprecated)]
|
||||
use std::panic::PanicInfo;
|
||||
|
||||
/// 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 {
|
||||
if let Some(res) = info.payload().downcast_ref::<String>() {
|
||||
if res.contains("BrokenPipe") || res.contains("Broken pipe") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue