rust-pretty-assertions icon indicating copy to clipboard operation
rust-pretty-assertions copied to clipboard

Consider publishing format_changeset as a crate

Open killercup opened this issue 7 years ago • 3 comments

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?

killercup avatar Jan 20 '18 17:01 killercup

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. :-)

colin-kiegel avatar Mar 09 '18 16:03 colin-kiegel

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.

CAD97 avatar Jun 03 '18 03:06 CAD97

Note to all: why is this useful? Because unit tests can now return Results, not only panick.

sanmai-NL avatar Oct 20 '18 17:10 sanmai-NL