From ed5cc1cbb93a797a5d1d80f433d60423c0b9ad25 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Mon, 9 Dec 2024 16:16:58 +0100 Subject: [PATCH] Improve test fail message --- crates/store/re_types/tests/types/validity.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/store/re_types/tests/types/validity.rs b/crates/store/re_types/tests/types/validity.rs index dab289a75f92..6b3f19cbe63a 100644 --- a/crates/store/re_types/tests/types/validity.rs +++ b/crates/store/re_types/tests/types/validity.rs @@ -31,8 +31,9 @@ fn validity_checks() { let serialized = Position2D::to_arrow2_opt(bad).unwrap(); let deserialized = Position2D::from_arrow2(serialized.as_ref()); assert!(deserialized.is_err()); - assert!(matches!( - deserialized.err().unwrap(), - DeserializationError::MissingData { .. } - )); + let actual_error = deserialized.err().unwrap(); + assert!( + matches!(actual_error, DeserializationError::MissingData { .. }), + "Expected error MissingData, got {actual_error:?}", + ); }