[See here](https://github.com/rust-random/rand/pull/518#issuecomment-416488694). Example: > Very simple example: I have 1kk users with their weights. And I should select only 100 unique users.
See here.
Example: