Colored diff output for unit tests

Greetings rustaceans,

In one of my unit tests I have the following assert:

assert_eq(big_vector_of_structs_A, big_vector_of_structs_B);

When the assert fails, I get the "left" and "right" side printed out. Is there a way to get a colored diff to highlight what part is failing?

Thanks for any help!

-m

You can use the pretty_assertions crate.

@bjorn3, That's great! Thanks for the quick reply!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.