Skip to content

provide reservoir sampling for iterators #7722

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

Closed
thestinger opened this issue Jul 11, 2013 · 3 comments
Closed

provide reservoir sampling for iterators #7722

thestinger opened this issue Jul 11, 2013 · 3 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@thestinger
Copy link
Contributor

http://en.wikipedia.org/wiki/Reservoir_sampling

@huonw
Copy link
Member

huonw commented Jul 11, 2013

I'm going to have this in my rand rewrite.

@robertknight
Copy link
Contributor

Hi @huonw - Missed your comment from earlier. Did you already implement something similar?

@huonw
Copy link
Member

huonw commented Aug 13, 2013

@robertknight, nope; your code looks good.

@bors bors closed this as completed in 435020e Aug 15, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Sep 28, 2021
Stop suggesting a float truncation that is not shorter

Fixes rust-lang#7721.

Previously Clippy would say that a number has excessive precision even if it has the minimum possible precision for the floating point value that it corresponds to.

changelog: Fix [`excessive_precision`] being triggered on floats that are already written in shortest form
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants