This is an automated email from the ASF dual-hosted git repository. kriskras99 pushed a commit to branch fix/small_things in repository https://gitbox.apache.org/repos/asf/avro-rs.git
commit a1bfb304830dbd94bffaf23d98ea0a323418c7c0 Author: Kriskras99 <[email protected]> AuthorDate: Wed Feb 25 21:58:37 2026 +0100 fix: Use `#[track_caller]` for `assert{,_not}_logged` to show the caller source location when panicking --- avro_test_helper/src/logger.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/avro_test_helper/src/logger.rs b/avro_test_helper/src/logger.rs index fe83238..738cdee 100644 --- a/avro_test_helper/src/logger.rs +++ b/avro_test_helper/src/logger.rs @@ -60,6 +60,7 @@ pub fn clear_log_messages() { }); } +#[track_caller] pub fn assert_not_logged(unexpected_message: &str) { LOG_MESSAGES.with(|msgs| match msgs.borrow().last() { Some(last_log) if last_log == unexpected_message => { @@ -69,6 +70,7 @@ pub fn assert_not_logged(unexpected_message: &str) { }); } +#[track_caller] pub fn assert_logged(expected_message: &str) { let mut deleted = false; LOG_MESSAGES.with(|msgs| {
