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

gix_mailmap::Snapshot does not implement Debug or Eq #1424

Closed
emilazy opened this issue Jun 26, 2024 · 4 comments · Fixed by #1426
Closed

gix_mailmap::Snapshot does not implement Debug or Eq #1424

emilazy opened this issue Jun 26, 2024 · 4 comments · Fixed by #1426
Labels
acknowledged an issue is accepted as shortcoming to be fixed enhancement New feature or request

Comments

@emilazy
Copy link
Contributor

emilazy commented Jun 26, 2024

Summary 💡

It would be nice to be able to print and compare .mailmap snapshots for equality. Ideally the semantics would be the same as with .entries(), but without allocating a new Vec.

Motivation 🔦

I would like to include this type in types that #[derive(Debug, PartialEq, Eq)] for martinvonz/jj#3951, and it just seems like generally‐useful functionality to have.

@emilazy emilazy added the enhancement New feature or request label Jun 26, 2024
@Byron Byron added acknowledged an issue is accepted as shortcoming to be fixed feedback requested labels Jun 26, 2024
@Byron
Copy link
Owner

Byron commented Jun 26, 2024

Thanks for letting me know!

Is this something you'd like to submit a PR for? If not (or it's more complicated), I am happy to pitch in.

@emilazy
Copy link
Contributor Author

emilazy commented Jun 26, 2024

I can try to find the time to take a look once I’ve popped enough other tasks off the stack. But maybe just #[derive] would work here? It might not produce the prettiest output for Debug, though.

@Byron
Copy link
Owner

Byron commented Jun 26, 2024

Alright, a PR is up, and the debug print should be fine (it's just a Vec internally).

@Byron
Copy link
Owner

Byron commented Jun 26, 2024

And the fix is available here: https://github.com/Byron/gitoxide/releases/tag/gix-mailmap-v0.23.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
acknowledged an issue is accepted as shortcoming to be fixed enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants