Skip to content

Commit

Permalink
fix: Correct a couple of mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaralice committed Nov 12, 2023
1 parent a0f7359 commit 00c2503
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gstd/src/common/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,16 @@ mod panic_handler {
use crate::ext;
use core::panic::PanicInfo;

#[cfg(not(all(feature = "panic-message", feature = "debug")))]
#[cfg(not(all(feature = "panic-messages", feature = "debug")))]
#[panic_handler]
pub fn panic(_: &PanicInfo) -> ! {
ext::panic("no info")
}

#[cfg(all(feature = "panic-message", feature = "debug"))]
#[cfg(all(feature = "panic-messages", feature = "debug"))]
#[panic_handler]
pub fn panic(panic_info: &PanicInfo) -> ! {
use crate::prelude::format;
let msg = match (panic_info.message(), panic_info.location()) {
(Some(msg), Some(loc)) => format!(
"'{:?}', {}:{}:{}",
Expand Down

0 comments on commit 00c2503

Please sign in to comment.