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

Remove Socket token generic in favor of a struct #25

Merged
merged 1 commit into from
Oct 2, 2014

Conversation

carllerche
Copy link
Member

Token has become a tuple struct wrapping a single uint. Using a generic
is not much use because supporting epoll and kqueue require that:

a) implement Copy
b) fit in the same number of bytes as uint

Given these requirements, it seems easier to just use a uint based
token.

Note that the TOKEN_{N} hack is to work around a rust bug (rust-lang/rust#17722) that has been fixed in a PR but is waiting to be pulled in.

Token has become a tuple struct wrapping a single uint. Using a generic
is not much use because supporting epoll and kqueue require that:

a) implement Copy
b) fit in the same number of bytes as uint

Given these requirements, it seems easier to just use a uint based
token.
@carllerche carllerche merged commit 49e99b3 into master Oct 2, 2014
@carllerche carllerche deleted the simplify-generics branch October 6, 2014 18:21
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

1 participant