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

Add methods on Map and Value to destroy preserved ordering #1199

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

dtolnay
Copy link
Member

@dtolnay dtolnay commented Oct 17, 2024

Closes #1014.

///
/// Other maps nested within the values of this map are not sorted. If you
/// need the entire data structure to be sorted at all levels, you must also
/// call `map.`[`values_mut`]`().for_each(`[`Value::sort_all_objects`]`)`.
Copy link
Member Author

@dtolnay dtolnay Oct 17, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is rendered badly but I filed rust-lang/rust#131845 to follow up in rustdoc. The standard library is also impacted.

@dtolnay dtolnay merged commit 2679e30 into serde-rs:master Oct 17, 2024
16 checks passed
@dtolnay dtolnay deleted the sort branch October 17, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Add a .sort() method to expose IndexMap::sort_keys()
1 participant