rust-pretty-assertions
rust-pretty-assertions copied to clipboard
Consider publishing format_changeset as a crate
I just copied format_changeset.rs verbatim into a repo (cf. https://github.com/rust-lang-nursery/rust-clippy/pull/2384) to get your fancy diff output without the assert/panic part :)
Maybe it'd make sense to create at difference-formatters crate that contains, well, some formatters for text diffs using difference?
Sorry for answering late. Sounds reasonable, but so don't want to maintain another crate right now.
But if anyone else out there does, I would consider using this as a dependency. :-)
I just published colored-diff. [GitHub]
Currently it just handles the case of formatting the difference between two &str, but I can make the function that takes a difference::Changeset public if that's necessary for it to be used here.
Note to all: why is this useful? Because unit tests can now return Results, not only panick.