Skip to content

Conversation

mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented May 22, 2017

This removes the need to manually implement Sample for types that implement IndependentSample, cutting down on boilerplate and reducing chances for mis-matched implementations.

It also adds blanket impls for &T where T: IndependentSample, so that .sample() can be called on these types without needing a unique reference.

This is a breaking change because it conflicts with crates that implement both Sample and IndependentSample for their own types.

This removes the need to manually implement Sample for types that
implement IndependentSample, cutting down on boilerplate and reducing
chances for mis-matched implementations.

It also adds blanket impls for `&T` where `T: IndependentSample`, so
that `.sample()` can be called on these types without needing a unique
reference.

This is a breaking change because it conflicts with crates that impl
both Sample and IndependentSample for their own types.
@mbrubeck
Copy link
Contributor Author

This may not be worth doing if one (or both) of these traits is ultimately going away, ala #27.

@alexcrichton alexcrichton added the B-API Breakage: API label Jun 14, 2017
@dhardy
Copy link
Member

dhardy commented Jan 24, 2018

Indeed, we're aiming for something closer to #27, though not exactly (I have an incomplete implementation here).

@dhardy dhardy closed this Jan 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-API Breakage: API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants