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

BTreeMap: clean up implementation of clone #81276

Closed
wants to merge 4 commits into from

Conversation

ssomers
Copy link
Contributor

@ssomers ssomers commented Jan 22, 2021

This implementation has dodged waves of refactoring by dressing to intimidate.

r? @Mark-Simulacrum

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 22, 2021
@@ -149,40 +149,34 @@ impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> {
fn clone(&self) -> BTreeMap<K, V> {
fn clone_subtree<'a, K: Clone, V: Clone>(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Previously support functions have move to support modules to downsize map.rs, but I don't know where to move this.

@ssomers
Copy link
Contributor Author

ssomers commented Jan 23, 2021

I forgot to mention one difference, an empty allocated map is no longer cloned as an unallocated map, and failed to realize another: a panic in clone no longer involves cleanup of the stuff already cloned.

@ssomers ssomers marked this pull request as draft January 23, 2021 11:30
@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 24, 2021
@bors
Copy link
Contributor

bors commented Feb 5, 2021

☔ The latest upstream changes (presumably #81257) made this pull request unmergeable. Please resolve the merge conflicts.

@ssomers
Copy link
Contributor Author

ssomers commented Feb 5, 2021

Can't find something really elegant, and building on both #81300 and #81486, so let's just bury it.

@ssomers ssomers closed this Feb 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants