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 clone_from and use IndexMap::extend #952

Merged
merged 1 commit into from
Nov 18, 2022

Conversation

Lucretiel
Copy link
Contributor

@Lucretiel Lucretiel commented Nov 17, 2022

This PR adds clone_from to Map's Clone implementation, so that clones can take advantage of existing storage. Additionally, Map::append now uses IndexMap::extend, to take advantage of reservation logic.

@Lucretiel Lucretiel changed the title Use derive for common map trait implementations Add clone_from and use IndexMap::extend Nov 17, 2022
Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit 057957c into serde-rs:master Nov 18, 2022
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.

2 participants