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

feat: Add Array::sort_by #642

Merged
merged 1 commit into from Oct 27, 2023
Merged

feat: Add Array::sort_by #642

merged 1 commit into from Oct 27, 2023

Conversation

epage
Copy link
Member

@epage epage commented Oct 27, 2023

Array::sort_by_key can't really use a borrowed key because it will be shuffling things around. As an alternative, we can just provide the cmp to use.

Fixes #639

`Array::sort_by_key` can't really use a borrowed key because it will be
shuffling things around.  As an alternative, we can just provide the
`cmp` to use.

Fixes toml-rs#639
@epage epage merged commit fd52d09 into toml-rs:main Oct 27, 2023
13 checks passed
@epage epage deleted the sort branch October 27, 2023 16:02
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.

Array::sort_by_key doesn't work with Value::as_* methods
1 participant