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

Implement BTreeMap::append #5

Open
apasel422 opened this issue Sep 11, 2015 · 5 comments
Open

Implement BTreeMap::append #5

apasel422 opened this issue Sep 11, 2015 · 5 comments

Comments

@apasel422
Copy link
Contributor

No description provided.

@cshinaver
Copy link

I'd like to work on implementing this, but I was having some trouble figuring out the testing. It seems that there is a private dependency on a btree repo ( #9 ). I tried removing the dependency and running the tests, but (unsurprisingly) it didn't compile. Do the existing tests pass? Where would be the best place to get started?

@Gankra
Copy link

Gankra commented Nov 29, 2015

#9 is now fixed! \o/

@cshinaver
Copy link

Thanks @gankro and @apasel422

It seems that there is not an already existing append function for the BTreeMap. Is this supposed to mirror the extend function?

@Gankra
Copy link

Gankra commented Nov 30, 2015

It takes another collection of the same type and moves all of its elements into self. See Vec::append, LinkedList::append. It's basically an extend that can be optimized based on the fact that both collections are the same type.

@gereeter
Copy link
Owner

See rust-lang/rust#26227 for some discussion and code on implementing this. Sorry for not touching this code in quite a while - I'm very swamped right now.

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

No branches or pull requests

4 participants