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

Rewrite slab making it more idiomatic #35

Merged
merged 15 commits into from Jul 24, 2017
Merged

Rewrite slab making it more idiomatic #35

merged 15 commits into from Jul 24, 2017

Conversation

carllerche
Copy link
Member

he goal of the rewrite is to make the APIs more idiomatic and more in line with other types in the Rust std. Also, any existing function that wasn't necessary has been removed in favor of a smaller API surface.

@carllerche
Copy link
Member Author

carllerche commented Jul 24, 2017 via email

@carllerche
Copy link
Member Author

I forgot that I wrote this... but it looks good to me!

@carllerche carllerche merged commit 3292bdf into master Jul 24, 2017
@peterdelevoryas
Copy link

Hello @carllerche, I was using slab prior to this change, and I found the index type parameter great, even though it might have only added a tiny amount of practical type safety to my use cases. I'm disappointed that it was removed, and while I don't expect you to revert the change, I would be curious if you had more justification for the change. Personally, I don't see how a generic index type that implements From<usize> and Into<usize> is less idiomatic than the HashSet and HashMap API's which require the key to implement Hash, but I would be very interested to know if there were some discussions elsewhere that I'm not aware of, or if you have further justification for it. Thanks!

@carllerche
Copy link
Member Author

It was just more complexity that didn't seem to carry its weight. You can always decorate the slab to take your custom key type.

@peterdelevoryas
Copy link

I see, thanks for humoring me!

@taiki-e taiki-e deleted the rewrite branch January 30, 2021 18:17
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.

None yet

2 participants