Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement Hash for Event, PollOpt, Ready #663
Comments
This comment has been minimized.
This comment has been minimized.
|
TBH, I don't know if this makes sense. These values are structured to permit internal bits to be set. As such, equality / hash are hard to cleanly define as they could look to be the same but internally be different. |
This comment has been minimized.
This comment has been minimized.
|
Not to mention, in not sure when it would make sense to hash these values. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
If values can externally look the same but internally be different, that indeed rules out Hash. |
This comment has been minimized.
This comment has been minimized.
|
@carllerche oh I thought the internal bits were just platform-specific bits, but are there other use cases as well? That is, given any instance of |
This comment has been minimized.
This comment has been minimized.
|
@alexcrichton Mio is permitted to use internal Ready bits as it sees fit. I believe that we specifically prevent construction of Ready to / from |
This comment has been minimized.
This comment has been minimized.
|
Looks like I stopped, that said I would want to reserve the ability. I don't think it makes sense to impl |
carllerche
added
the
help wanted
label
Aug 18, 2017
This comment has been minimized.
This comment has been minimized.
|
Ah ok, makse sense to me! Do you think it'd be bad, though, to implement |
This comment has been minimized.
This comment has been minimized.
|
I'm unsure, but I would lean towards being conservative and not have impls because
That said, my opinion isn't strong, so if people still think it is worth having these impls, then I am OK w/ it. |
This comment has been minimized.
This comment has been minimized.
|
Gonna close this as it's been sitting for a while with nobody that seems willing to carry it through. |
dtolnay commentedAug 18, 2017
Per the API guidelines' recommendation to eagerly implement common traits.