Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider publishing format_changeset as a crate #21

Open
killercup opened this issue Jan 20, 2018 · 3 comments
Open

Consider publishing format_changeset as a crate #21

killercup opened this issue Jan 20, 2018 · 3 comments

Comments

@killercup
Copy link

I just copied format_changeset.rs verbatim into a repo (cf. rust-lang/rust-clippy#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?

@colin-kiegel
Copy link
Collaborator

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

@CAD97
Copy link

CAD97 commented Jun 3, 2018

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.

@sanmai-NL
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants