Skip to content

Commit

Permalink
fix: failing test due to rust panic message change
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgattozzi committed Jan 9, 2024
1 parent 6f5006d commit 2ea4352
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions panic_logging/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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; "
);
}
}

0 comments on commit 2ea4352

Please sign in to comment.