Skip to content

Commit

Permalink
Remove panic_with!-macro only used once
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrimmel committed Sep 22, 2024
1 parent 28a37a5 commit 66cd2b7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ fn main() {
127
}
Ok(_) => 0,
Err(e @ valgrind::Error::MalformedOutput(..)) => {
panic_with!(e);
}
Err(e @ valgrind::Error::MalformedOutput(..)) => std::panic::panic_any(e), // the panic handler catches this and reports it appropriately
Err(valgrind::Error::ValgrindFailure(output)) if output.contains(STACK_OVERFLOW) => {
output::display_stack_overflow(&output);
134 // default exit code for stack overflows
Expand Down
11 changes: 0 additions & 11 deletions src/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ const PANIC_HEADER: &str = "
how to reproduce it.
";

/// Panic with a custom panic output.
///
/// This is helpful for printing debug information to the panic message.
#[macro_export]
#[allow(clippy::module_name_repetitions)] // necessary for exported macro
macro_rules! panic_with {
($e:expr) => {
std::panic::panic_any($e)
};
}

/// Replaces any previous hook with the custom hook of this application.
///
/// This custom hook points the user to the project repository and asks them to
Expand Down

0 comments on commit 66cd2b7

Please sign in to comment.