-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Conversation
@@ -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>( |
There was a problem hiding this comment.
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.
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. |
9414135
to
a623464
Compare
a623464
to
35c7567
Compare
☔ The latest upstream changes (presumably #81257) made this pull request unmergeable. Please resolve the merge conflicts. |
This implementation has dodged waves of refactoring by dressing to intimidate.
r? @Mark-Simulacrum