From 0207d17fcd255624db9926f8956696dfd8386a08 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 17 Jun 2020 20:55:19 +0000 Subject: [PATCH] ffiutil: Format full errors from anyhow We need to use this alternative formatter to get full errors including the full context chain. IMO the anyhow default is broken. --- rust/src/ffiutil.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/src/ffiutil.rs b/rust/src/ffiutil.rs index 0f3633b184..d276982bd7 100644 --- a/rust/src/ffiutil.rs +++ b/rust/src/ffiutil.rs @@ -153,7 +153,7 @@ pub(crate) fn error_to_glib(e: &E, gerror: *mut *mut glib_sys::GErro } unsafe { assert!((*gerror).is_null()); - let c_msg = CString::new(e.to_string()).unwrap(); + let c_msg = CString::new(format!("{:#}", e)).unwrap(); *gerror = glib_sys::g_error_new_literal( gio_sys::g_io_error_quark(), gio_sys::G_IO_ERROR_FAILED,