-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Make BTreeMap::clone()
not allocate when cloning an empty tree.
#51893
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors r+ |
@gankro: 🔑 Insufficient privileges: Not in reviewers |
src/liballoc/btree/map.rs
Outdated
@@ -213,7 +213,16 @@ impl<K: Clone, V: Clone> Clone for BTreeMap<K, V> { | |||
} | |||
} | |||
|
|||
clone_subtree(self.root.as_ref()) | |||
if self.len() == 0 { | |||
// XXX: ideally we'd call `BTreeMap::new` here, but that has the |
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.
Tidy is complaining XXX is deprecated notation; i would just drop the XXX, comment is fine without it
☔ The latest upstream changes (presumably #51569) made this pull request unmergeable. Please resolve the merge conflicts. |
@bors delegate+ (this is effectively r=me at this point pending rebase and nit) |
✌️ @nnethercote can now approve this pull request |
f5e99e8
to
cf3786d
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
cf3786d
to
f46f05b
Compare
@bors: r+ |
📌 Commit f46f05b has been approved by |
⌛ Testing commit f46f05b with merge 3a35d425288de5289e194a888d0be2f23ce14766... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
1 similar comment
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry |
Make `BTreeMap::clone()` not allocate when cloning an empty tree. r? @gankro CC @porglezomp
☀️ Test successful - status-appveyor, status-travis |
r? @gankro
CC @porglezomp