From 2ea435223c539f71b9d0969fbb58f6c1c801ffce Mon Sep 17 00:00:00 2001 From: Michael Gattozzi Date: Tue, 9 Jan 2024 13:18:14 -0500 Subject: [PATCH] fix: failing test due to rust panic message change Inbetween rustc 1.72 and rustc 1.75 the way that error messages were displayed when panicing changed. One of our tests depended on the output of that behavior and this commit updates the error message to the new form so that tests will pass. --- panic_logging/src/lib.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/panic_logging/src/lib.rs b/panic_logging/src/lib.rs index b82f3b461f6..c1413b536c1 100644 --- a/panic_logging/src/lib.rs +++ b/panic_logging/src/lib.rs @@ -260,9 +260,12 @@ mod tests { assert_eq!( capture.to_string(), - "level = ERROR; message = Thread panic; panic_type = \"unknown\"; panic_info = panicked at 'it's bananas', panic_logging/src/lib.rs:227:13; \n\ - level = ERROR; message = Thread panic; panic_type = \"offset_overflow\"; panic_info = panicked at 'offset', panic_logging/src/lib.rs:235:13; \n\ - level = ERROR; message = Thread panic; panic_type = \"offset_overflow\"; panic_info = panicked at 'offset overflow', panic_logging/src/lib.rs:244:13; " + "level = ERROR; message = Thread panic; panic_type = \"unknown\"; panic_info = panicked at panic_logging/src/lib.rs:227:13:\n\ + it's bananas; \n\ + level = ERROR; message = Thread panic; panic_type = \"offset_overflow\"; panic_info = panicked at panic_logging/src/lib.rs:235:13:\n\ + offset; \n\ + level = ERROR; message = Thread panic; panic_type = \"offset_overflow\"; panic_info = panicked at panic_logging/src/lib.rs:244:13:\n\ + offset overflow; " ); } }