Skip to content

Commit

Permalink
android: improve panic_hook output. {:?} will show not actually show …
Browse files Browse the repository at this point in the history
…the error message. Instead we should use {}.
  • Loading branch information
jkds authored and not-fl3 committed Jan 8, 2025
1 parent 709fe99 commit 467791b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/native/android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ where
use std::panic;

panic::set_hook(Box::new(|info| {
let msg = CString::new(format!("{:?}", info)).unwrap_or_else(|_| {
let msg = CString::new(format!("{info}")).unwrap_or_else(|_| {
CString::new(format!("MALFORMED ERROR MESSAGE {:?}", info.location())).unwrap()
});
console_error(msg.as_ptr());
Expand Down

0 comments on commit 467791b

Please sign in to comment.