11 stable releases
| 1.7.0 | Feb 24, 2025 |
|---|---|
| 1.6.1 | Jan 19, 2025 |
| 1.6.0 | Sep 5, 2024 |
| 1.5.0 | Aug 20, 2023 |
| 1.1.0 | Feb 27, 2021 |
#36 in Rust patterns
1,901,898 downloads per month
Used in 398 crates
(250 directly)
35KB
710 lines
similar-asserts
similar-asserts is a crate that enhances the default assertion experience
by using similar for diffing. It supports
comparing either Debug or Serialize representations of values. On failed
assertions it renders out a colorized diff to the terminal.
fn main() {
let reference = vec![1, 2, 3, 4];
similar_asserts::assert_eq!(reference, (0..4).collect::<Vec<_>>());
}

Related Projects
License and Links
- Documentation
- Issue Tracker
- Examples
- License: Apache-2.0
Dependencies
~0.3–11MB
~65K SLoC