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

Print structs in a stable order #5561

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hunger
Copy link
Member

@hunger hunger commented Jul 5, 2024

Just to make it easier to compare the output :-)

@ogoffart
Copy link
Member

ogoffart commented Jul 6, 2024

One other way to do it is to collect into a BTreeMap, which sort all its elements by key

@ogoffart
Copy link
Member

ogoffart commented Jul 7, 2024

In fact, thinking about it, values could probably be a BTreeMap. This would be better for reproducible output which we currently don't test for

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

Successfully merging this pull request may close these issues.

None yet

2 participants