Skip to content

Commit a319d02

Browse files
MakitaTokinyurik
authored andcommitted
optimize panic message format in assert_eq macro
1 parent 831c929 commit a319d02

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/panicking.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,8 @@ fn assert_failed_inner(
268268
Some(args) => panic!(
269269
r#"assertion failed: `(left {} right)`
270270
left: `{:?}`,
271-
right: `{:?}`: {}"#,
271+
right: `{:?}`,
272+
context: `{:?}`"#,
272273
op, left, right, args
273274
),
274275
None => panic!(

0 commit comments

Comments
 (0)