Skip to content

Add regression test for sort_maps not sorting Vecs#892

Merged
max-sixty merged 4 commits intomitsuhiko:masterfrom
max-sixty:revert
Mar 29, 2026
Merged

Add regression test for sort_maps not sorting Vecs#892
max-sixty merged 4 commits intomitsuhiko:masterfrom
max-sixty:revert

Conversation

@max-sixty
Copy link
Copy Markdown
Collaborator

Adds a regression test ensuring sort_maps only sorts map keys, not sequence values. The bug in #876 sorted all Seq values (including Vec), which broke snapshot stability for ordered collections.

The test snapshots a HashMap containing a Vec with sort_maps enabled and asserts the Vec order is preserved.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 4 commits March 28, 2026 22:19
Reverts mitsuhiko#876 (sort sequences in `sort_maps`) which was a breaking change —
it sorted all `Seq` values including `Vec`, not just `HashSet`.

Co-Authored-By: Claude <noreply@anthropic.com>
Ensures sort_maps only sorts map keys, not sequence values.
The bug in mitsuhiko#876 sorted all Seq values (including Vec), which
broke snapshot stability for ordered collections.

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit 65a5233 into mitsuhiko:master Mar 29, 2026
15 checks passed
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.

1 participant