In Rust

For easy comparisons during automated tests

To generate words level diffing when comparing complex nested structures in Rust, there is a very nice crate called pretty_assertions.

cargo add pretty_assertions --dev

In your mod tests, you can import the 2 macros that replace the default ones: assert_eq and assert_ne.

use pretty_assertions::{assert_eq, assert_ne};

The output will change from this very raw uncolored text

to this delightful display

For your Rust projects

We use the crate similar to achieve words level diffing in Delibay.