diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-09-09 22:18:08 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-09-09 22:18:08 +0200 |
| commit | 611458ba06940a28925e5f82609175c4f62cfb52 (patch) | |
| tree | f1b3d95527cb6a8530bf03a1ac3a4c8284e8940d /src/libstd | |
| parent | 0b36e9dea3f2ff25b1d0df2669836c33cce89ae5 (diff) | |
| parent | 32101ad3b38d29291a5150840e88aeef2fb911a1 (diff) | |
| download | rust-611458ba06940a28925e5f82609175c4f62cfb52.tar.gz rust-611458ba06940a28925e5f82609175c4f62cfb52.zip | |
Rollup merge of #63806 - mati865:rand, r=alexcrichton
Upgrade rand to 0.7 Also upgrades `getrandom` to avoid bug encountered by https://github.com/rust-lang/rust/pull/61393 which bumps libc to `0.2.62`.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/Cargo.toml | 2 | ||||
| -rw-r--r-- | src/libstd/fs.rs | 2 | ||||
| -rw-r--r-- | src/libstd/tests/env.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/libstd/Cargo.toml b/src/libstd/Cargo.toml index b5cbec7b0fa..20442abc588 100644 --- a/src/libstd/Cargo.toml +++ b/src/libstd/Cargo.toml @@ -38,7 +38,7 @@ features = [ optional = true [dev-dependencies] -rand = "0.6.1" +rand = "0.7" [target.x86_64-apple-darwin.dependencies] rustc_asan = { path = "../librustc_asan" } diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 5f76875bd66..b14e02a2cb4 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -2144,7 +2144,7 @@ mod tests { use crate::sys_common::io::test::{TempDir, tmpdir}; use crate::thread; - use rand::{rngs::StdRng, FromEntropy, RngCore}; + use rand::{rngs::StdRng, RngCore, SeedableRng}; #[cfg(windows)] use crate::os::windows::fs::{symlink_dir, symlink_file}; diff --git a/src/libstd/tests/env.rs b/src/libstd/tests/env.rs index 06fb5533afd..f8014cb2ad9 100644 --- a/src/libstd/tests/env.rs +++ b/src/libstd/tests/env.rs @@ -5,7 +5,7 @@ use rand::{thread_rng, Rng}; use rand::distributions::Alphanumeric; fn make_rand_name() -> OsString { - let mut rng = thread_rng(); + let rng = thread_rng(); let n = format!("TEST{}", rng.sample_iter(&Alphanumeric).take(10) .collect::<String>()); let n = OsString::from(n); |
