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

Refactor Keys and Values iterators to only have one type parameter. #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

reem
Copy link
Member

@reem reem commented Nov 23, 2015

Review on Reviewable

@apasel422
Copy link

Is there a way to reduce the duplication of the RawKeyBucket and RawValueBucket structs and their impls with a generic type?

Edit: It seems like we can just replace those structs with a single RawItemBucket<T> struct and a single set of generic impls?

@Gankra
Copy link

Gankra commented Nov 24, 2015

I'm not sure it's advisable to make the source of this deviate this substantially from std. I was under the impression that this was largely intended to just add missing APIs.

@reem
Copy link
Member Author

reem commented Nov 24, 2015

Yeah, this has just bugged me for a while and I don't think it's possible to fix in std (it would be a breaking change).

@bluss
Copy link

bluss commented Nov 28, 2015

Just philosophizing, but having both the K and V parameters means that the internal memory layout has greater freedom to change, so in that sense dropping them is limiting future internal refactoring.

@reem
Copy link
Member Author

reem commented Nov 28, 2015

@bluss this is true. I originally figured I would need to erase the key/value type by storing its size, I only later discovered it's unnecessary 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

Successfully merging this pull request may close these issues.

4 participants