From: Ian Jackson Date: Sun, 20 Dec 2020 22:36:43 +0000 (+0000) Subject: update rand X-Git-Tag: otter-0.2.0~182 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bb3fd552b107234a7179cf46dc962613eef146a3;p=otter.git update rand One fix Promputed by "nailing-cargo -uo upgrades" Signed-off-by: Ian Jackson --- diff --git a/Cargo.lock.example b/Cargo.lock.example index c0209c9a..e5c37f14 100644 --- a/Cargo.lock.example +++ b/Cargo.lock.example @@ -266,7 +266,7 @@ dependencies = [ "hkdf", "hmac", "percent-encoding 2.1.0", - "rand", + "rand 0.7.3", "sha2", "time", ] @@ -581,6 +581,17 @@ dependencies = [ "wasi 0.9.0+wasi-snapshot-preview1", ] +[[package]] +name = "getrandom" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee8025cf36f917e6a52cce185b7c7177689b838b7ec138364e50cc2277a56cf4" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "ghash" version = "0.2.3" @@ -1127,7 +1138,7 @@ dependencies = [ "parking_lot", "percent-encoding 2.1.0", "pwd", - "rand", + "rand 0.8.0", "regex", "rmp", "rmp-serde", @@ -1352,11 +1363,23 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "getrandom", + "getrandom 0.1.15", "libc", - "rand_chacha", - "rand_core", - "rand_hc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] + +[[package]] +name = "rand" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76330fb486679b4ace3670f117bbc9e16204005c4bde9c4bd372f45bed34f12" +dependencies = [ + "libc", + "rand_chacha 0.3.0", + "rand_core 0.6.0", + "rand_hc 0.3.0", ] [[package]] @@ -1366,7 +1389,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.0", ] [[package]] @@ -1375,7 +1408,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.15", +] + +[[package]] +name = "rand_core" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8b34ba8cfb21243bd8df91854c830ff0d785fff2e82ebd4434c2644cb9ada18" +dependencies = [ + "getrandom 0.2.0", ] [[package]] @@ -1384,7 +1426,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core 0.6.0", ] [[package]] @@ -1753,7 +1804,7 @@ checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" dependencies = [ "cfg-if 0.1.10", "libc", - "rand", + "rand 0.7.3", "redox_syscall", "remove_dir_all", "winapi 0.3.9", diff --git a/Cargo.toml b/Cargo.toml index 81aa4013..b06ddac6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,7 +47,7 @@ ordered-float = "2" parking_lot = "0.11" percent-encoding = "2" pwd = "1" -rand = "0.7" +rand = "0.8" regex = "1" rmp = "0.8" rmp-serde = "0.15" diff --git a/src/global.rs b/src/global.rs index 2c5c416c..025fb045 100644 --- a/src/global.rs +++ b/src/global.rs @@ -1131,6 +1131,7 @@ impl RawToken { let mut rng = thread_rng(); let token = RawToken ( repeat_with(|| rng.sample(Alphanumeric)) + .map(char::from) .take(64).collect() ); token