This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch 370-print-debug-for-TestError
in repository https://gitbox.apache.org/repos/asf/avro-rs.git

commit c7c3ce2d420b11ae92b6a90541a8dbcf14d85d23
Author: Martin Tzvetanov Grigorov <[email protected]>
AuthorDate: Thu Jan 8 05:28:33 2026 +0200

    fix: Print the Debug impl of TestError for more info
    
    Fixes #370
    
    Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---
 avro_test_helper/src/lib.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/avro_test_helper/src/lib.rs b/avro_test_helper/src/lib.rs
index 8c570f5..43c94e3 100644
--- a/avro_test_helper/src/lib.rs
+++ b/avro_test_helper/src/lib.rs
@@ -56,10 +56,10 @@ pub struct TestError {}
 /// A converter of any error into [TestError].
 /// It is used to print better error messages in the tests.
 /// Borrowed from 
<https://bluxte.net/musings/2023/01/08/improving_failure_messages_rust_tests/>
-impl<Err: std::fmt::Display> From<Err> for TestError {
+impl<Err: std::fmt::Display + std::fmt::Debug> From<Err> for TestError {
     #[track_caller]
     fn from(err: Err) -> Self {
-        panic!("{}: {}", std::any::type_name::<Err>(), err);
+        panic!("{}: {:?}", std::any::type_name::<Err>(), err);
     }
 }
 

Reply via email to