Better diff representation using bold / color
- Dominant language
- Rust
- Stars
- 151
- Forks
- 17
- PR merge metrics
- No merged PRs in 30d
Description
Adding the semantics of swap, insertion or deletion.
This feature should be able to be turned on/off by [feature](https://doc.rust-lang.org/cargo/reference/features.html).
**Example 1:**
```
assert_that!(vec![1,4,3,2]).contains_exactly_in_order(vec![1,2,3,4]);
```
Idea of better message:
```
contents match, but order was wrong
---
expected: [1, 2, 3, 4]
actual : [1, 4, 3, 2]
```
**Example 2:**
```
assert_that!(vec![1, 3, 4, 5]).contains_exactly_in_order(vec![1,2,3,4]);
```
Idea of better message:
```
contents match, but order was wrong
---
expected: [1, 2, 3, 4]
actual : [1, 3, 4, 5]
```
**Color usage guideline:** Green should emphasize the normal case, and red should emphasize the unexpected case, imo.
**Estimation/design:** This needs quite big structural change in `Fact` struct. Specifically, more semantic structs may need to be defined to represent `added` or `deleted` object, because generating `Fact` should be decoupled from `formatting` in order to change the formatting logic in runtime.
Contributor guide
Assessment
This issue has not been assessed yet.