BurntSushi / byteorder

Rust library for reading/writing numbers in big-endian and little-endian.
The Unlicense
981 stars 143 forks source link

Update Rand version #127

Closed dhardy closed 5 years ago

dhardy commented 6 years ago

Regex currently requires Rand ^0.4. Given the extremely limited use by this library, you could probably get away with >= 0.3; I think at least >= 0.3 < 0.7 should be safe.

dhardy commented 6 years ago

Sorry, incorrect. But if you replace:

                let numbers: Vec<$numty> =
                    rand::thread_rng().gen_iter().take(100000).collect();

with

    let mut rng = thread_rng();
    let numbers: Vec<$numty> = (0..100000).map(|_| rng.gen()).collect();

you should have no problems. See https://github.com/rust-lang-nursery/rand/pull/286