From 467791bbc053b427a0bea25d5917b569923d26cc Mon Sep 17 00:00:00 2001 From: jkds Date: Wed, 8 Jan 2025 10:11:45 +0100 Subject: [PATCH] android: improve panic_hook output. {:?} will show not actually show the error message. Instead we should use {}. --- src/native/android.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/native/android.rs b/src/native/android.rs index 6cab4fa8..f56e3d28 100644 --- a/src/native/android.rs +++ b/src/native/android.rs @@ -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());