mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-25 11:14:46 +00:00
chore(deps): update rust crate rand to 0.9.0 (#15129)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [rand](https://rust-random.github.io/book) ([source](https://redirect.github.com/rust-random/rand)) | workspace.dependencies | minor | `0.8.5` -> `0.9.0` | --- ### Release Notes <details> <summary>rust-random/rand (rand)</summary> ### [`v0.9.0`](https://redirect.github.com/rust-random/rand/blob/HEAD/CHANGELOG.md#090---2025-01-27) [Compare Source](https://redirect.github.com/rust-random/rand/compare/0.8.5...0.9.0) ##### Security and unsafe - Policy: "rand is not a crypto library" ([#​1514](https://redirect.github.com/rust-random/rand/issues/1514)) - Remove fork-protection from `ReseedingRng` and `ThreadRng`. Instead, it is recommended to call `ThreadRng::reseed` on fork. ([#​1379](https://redirect.github.com/rust-random/rand/issues/1379)) - Use `zerocopy` to replace some `unsafe` code ([#​1349](https://redirect.github.com/rust-random/rand/issues/1349), [#​1393](https://redirect.github.com/rust-random/rand/issues/1393), [#​1446](https://redirect.github.com/rust-random/rand/issues/1446), [#​1502](https://redirect.github.com/rust-random/rand/issues/1502)) ##### Dependencies - Bump the MSRV to 1.63.0 ([#​1207](https://redirect.github.com/rust-random/rand/issues/1207), [#​1246](https://redirect.github.com/rust-random/rand/issues/1246), [#​1269](https://redirect.github.com/rust-random/rand/issues/1269), [#​1341](https://redirect.github.com/rust-random/rand/issues/1341), [#​1416](https://redirect.github.com/rust-random/rand/issues/1416), [#​1536](https://redirect.github.com/rust-random/rand/issues/1536)); note that 1.60.0 may work for dependents when using `--ignore-rust-version` - Update to `rand_core` v0.9.0 ([#​1558](https://redirect.github.com/rust-random/rand/issues/1558)) ##### Features - Support `std` feature without `getrandom` or `rand_chacha` ([#​1354](https://redirect.github.com/rust-random/rand/issues/1354)) - Enable feature `small_rng` by default ([#​1455](https://redirect.github.com/rust-random/rand/issues/1455)) - Remove implicit feature `rand_chacha`; use `std_rng` instead. ([#​1473](https://redirect.github.com/rust-random/rand/issues/1473)) - Rename feature `serde1` to `serde` ([#​1477](https://redirect.github.com/rust-random/rand/issues/1477)) - Rename feature `getrandom` to `os_rng` ([#​1537](https://redirect.github.com/rust-random/rand/issues/1537)) - Add feature `thread_rng` ([#​1547](https://redirect.github.com/rust-random/rand/issues/1547)) ##### API changes: rand_core traits - Add fn `RngCore::read_adapter` implementing `std::io::Read` ([#​1267](https://redirect.github.com/rust-random/rand/issues/1267)) - Add trait `CryptoBlockRng: BlockRngCore`; make `trait CryptoRng: RngCore` ([#​1273](https://redirect.github.com/rust-random/rand/issues/1273)) - Add traits `TryRngCore`, `TryCryptoRng` ([#​1424](https://redirect.github.com/rust-random/rand/issues/1424), [#​1499](https://redirect.github.com/rust-random/rand/issues/1499)) - Rename `fn SeedableRng::from_rng` -> `try_from_rng` and add infallible variant `fn from_rng` ([#​1424](https://redirect.github.com/rust-random/rand/issues/1424)) - Rename `fn SeedableRng::from_entropy` -> `from_os_rng` and add fallible variant `fn try_from_os_rng` ([#​1424](https://redirect.github.com/rust-random/rand/issues/1424)) - Add bounds `Clone` and `AsRef` to associated type `SeedableRng::Seed` ([#​1491](https://redirect.github.com/rust-random/rand/issues/1491)) ##### API changes: Rng trait and top-level fns - Rename fn `rand::thread_rng()` to `rand::rng()` and remove from the prelude ([#​1506](https://redirect.github.com/rust-random/rand/issues/1506)) - Remove fn `rand::random()` from the prelude ([#​1506](https://redirect.github.com/rust-random/rand/issues/1506)) - Add top-level fns `random_iter`, `random_range`, `random_bool`, `random_ratio`, `fill` ([#​1488](https://redirect.github.com/rust-random/rand/issues/1488)) - Re-introduce fn `Rng::gen_iter` as `random_iter` ([#​1305](https://redirect.github.com/rust-random/rand/issues/1305), [#​1500](https://redirect.github.com/rust-random/rand/issues/1500)) - Rename fn `Rng::gen` to `random` to avoid conflict with the new `gen` keyword in Rust 2024 ([#​1438](https://redirect.github.com/rust-random/rand/issues/1438)) - Rename fns `Rng::gen_range` to `random_range`, `gen_bool` to `random_bool`, `gen_ratio` to `random_ratio` ([#​1505](https://redirect.github.com/rust-random/rand/issues/1505)) - Annotate panicking methods with `#[track_caller]` ([#​1442](https://redirect.github.com/rust-random/rand/issues/1442), [#​1447](https://redirect.github.com/rust-random/rand/issues/1447)) ##### API changes: RNGs - Fix `<SmallRng as SeedableRng>::Seed` size to 256 bits ([#​1455](https://redirect.github.com/rust-random/rand/issues/1455)) - Remove first parameter (`rng`) of `ReseedingRng::new` ([#​1533](https://redirect.github.com/rust-random/rand/issues/1533)) ##### API changes: Sequences - Split trait `SliceRandom` into `IndexedRandom`, `IndexedMutRandom`, `SliceRandom` ([#​1382](https://redirect.github.com/rust-random/rand/issues/1382)) - Add `IndexedRandom::choose_multiple_array`, `index::sample_array` ([#​1453](https://redirect.github.com/rust-random/rand/issues/1453), [#​1469](https://redirect.github.com/rust-random/rand/issues/1469)) ##### API changes: Distributions: renames - Rename module `rand::distributions` to `rand::distr` ([#​1470](https://redirect.github.com/rust-random/rand/issues/1470)) - Rename distribution `Standard` to `StandardUniform` ([#​1526](https://redirect.github.com/rust-random/rand/issues/1526)) - Move `distr::Slice` -> `distr::slice::Choose`, `distr::EmptySlice` -> `distr::slice::Empty` ([#​1548](https://redirect.github.com/rust-random/rand/issues/1548)) - Rename trait `distr::DistString` -> `distr::SampleString` ([#​1548](https://redirect.github.com/rust-random/rand/issues/1548)) - Rename `distr::DistIter` -> `distr::Iter`, `distr::DistMap` -> `distr::Map` ([#​1548](https://redirect.github.com/rust-random/rand/issues/1548)) ##### API changes: Distributions - Relax `Sized` bound on `Distribution<T> for &D` ([#​1278](https://redirect.github.com/rust-random/rand/issues/1278)) - Remove impl of `Distribution<Option<T>>` for `StandardUniform` ([#​1526](https://redirect.github.com/rust-random/rand/issues/1526)) - Let distribution `StandardUniform` support all `NonZero*` types ([#​1332](https://redirect.github.com/rust-random/rand/issues/1332)) - Fns `{Uniform, UniformSampler}::{new, new_inclusive}` return a `Result` (instead of potentially panicking) ([#​1229](https://redirect.github.com/rust-random/rand/issues/1229)) - Distribution `Uniform` implements `TryFrom` instead of `From` for ranges ([#​1229](https://redirect.github.com/rust-random/rand/issues/1229)) - Add `UniformUsize` ([#​1487](https://redirect.github.com/rust-random/rand/issues/1487)) - Remove support for generating `isize` and `usize` values with `StandardUniform`, `Uniform` (except via `UniformUsize`) and `Fill` and usage as a `WeightedAliasIndex` weight ([#​1487](https://redirect.github.com/rust-random/rand/issues/1487)) - Add impl `DistString` for distributions `Slice<char>` and `Uniform<char>` ([#​1315](https://redirect.github.com/rust-random/rand/issues/1315)) - Add fn `Slice::num_choices` ([#​1402](https://redirect.github.com/rust-random/rand/issues/1402)) - Add fn `p()` for distribution `Bernoulli` to access probability ([#​1481](https://redirect.github.com/rust-random/rand/issues/1481)) ##### API changes: Weighted distributions - Add `pub` module `rand::distr::weighted`, moving `WeightedIndex` there ([#​1548](https://redirect.github.com/rust-random/rand/issues/1548)) - Add trait `weighted::Weight`, allowing `WeightedIndex` to trap overflow ([#​1353](https://redirect.github.com/rust-random/rand/issues/1353)) - Add fns `weight, weights, total_weight` to distribution `WeightedIndex` ([#​1420](https://redirect.github.com/rust-random/rand/issues/1420)) - Rename enum `WeightedError` to `weighted::Error`, revising variants ([#​1382](https://redirect.github.com/rust-random/rand/issues/1382)) and mark as `#[non_exhaustive]` ([#​1480](https://redirect.github.com/rust-random/rand/issues/1480)) ##### API changes: SIMD - Switch to `std::simd`, expand SIMD & docs ([#​1239](https://redirect.github.com/rust-random/rand/issues/1239)) ##### Reproducibility-breaking changes - Make `ReseedingRng::reseed` discard remaining data from the last block generated ([#​1379](https://redirect.github.com/rust-random/rand/issues/1379)) - Change fn `SmallRng::seed_from_u64` implementation ([#​1203](https://redirect.github.com/rust-random/rand/issues/1203)) - Allow `UniformFloat::new` samples and `UniformFloat::sample_single` to yield `high` ([#​1462](https://redirect.github.com/rust-random/rand/issues/1462)) - Fix portability of distribution `Slice` ([#​1469](https://redirect.github.com/rust-random/rand/issues/1469)) - Make `Uniform` for `usize` portable via `UniformUsize` ([#​1487](https://redirect.github.com/rust-random/rand/issues/1487)) - Fix `IndexdRandom::choose_multiple_weighted` for very small seeds and optimize for large input length / low memory ([#​1530](https://redirect.github.com/rust-random/rand/issues/1530)) ##### Reproducibility-breaking optimisations - Optimize fn `sample_floyd`, affecting output of `rand::seq::index::sample` and `rand::seq::SliceRandom::choose_multiple` ([#​1277](https://redirect.github.com/rust-random/rand/issues/1277)) - New, faster algorithms for `IteratorRandom::choose` and `choose_stable` ([#​1268](https://redirect.github.com/rust-random/rand/issues/1268)) - New, faster algorithms for `SliceRandom::shuffle` and `partial_shuffle` ([#​1272](https://redirect.github.com/rust-random/rand/issues/1272)) - Optimize distribution `Uniform`: use Canon's method (single sampling) / Lemire's method (distribution sampling) for faster sampling (breaks value stability; [#​1287](https://redirect.github.com/rust-random/rand/issues/1287)) - Optimize fn `sample_single_inclusive` for floats (+~20% perf) ([#​1289](https://redirect.github.com/rust-random/rand/issues/1289)) ##### Other optimisations - Improve `SmallRng` initialization performance ([#​1482](https://redirect.github.com/rust-random/rand/issues/1482)) - Optimise SIMD widening multiply ([#​1247](https://redirect.github.com/rust-random/rand/issues/1247)) ##### Other - Add `Cargo.lock.msrv` file ([#​1275](https://redirect.github.com/rust-random/rand/issues/1275)) - Reformat with `rustfmt` and enforce ([#​1448](https://redirect.github.com/rust-random/rand/issues/1448)) - Apply Clippy suggestions and enforce ([#​1448](https://redirect.github.com/rust-random/rand/issues/1448), [#​1474](https://redirect.github.com/rust-random/rand/issues/1474)) - Move all benchmarks to new `benches` crate ([#​1329](https://redirect.github.com/rust-random/rand/issues/1329), [#​1439](https://redirect.github.com/rust-random/rand/issues/1439)) and migrate to Criterion ([#​1490](https://redirect.github.com/rust-random/rand/issues/1490)) ##### Documentation - Improve `ThreadRng` related docs ([#​1257](https://redirect.github.com/rust-random/rand/issues/1257)) - Docs: enable experimental `--generate-link-to-definition` feature ([#​1327](https://redirect.github.com/rust-random/rand/issues/1327)) - Better doc of crate features, use `doc_auto_cfg` ([#​1411](https://redirect.github.com/rust-random/rand/issues/1411), [#​1450](https://redirect.github.com/rust-random/rand/issues/1450)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "before 5am on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/cargo). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNDUuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE0NS4wIiwidGFyZ2V0QnJhbmNoIjoibWFzdGVyIiwibGFiZWxzIjpbXX0=-->
This commit is contained in:
commit
6d1f6be115
125
Cargo.lock
generated
125
Cargo.lock
generated
@ -17,7 +17,7 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"once_cell",
|
||||
"version_check",
|
||||
"zerocopy",
|
||||
"zerocopy 0.7.35",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -178,7 +178,7 @@ dependencies = [
|
||||
"cargo-util",
|
||||
"criterion",
|
||||
"flate2",
|
||||
"rand",
|
||||
"rand 0.9.0",
|
||||
"tar",
|
||||
"url",
|
||||
]
|
||||
@ -353,7 +353,7 @@ dependencies = [
|
||||
"os_info",
|
||||
"pasetors",
|
||||
"pathdiff",
|
||||
"rand",
|
||||
"rand 0.9.0",
|
||||
"regex",
|
||||
"rusqlite",
|
||||
"rustc-hash 2.0.0",
|
||||
@ -807,7 +807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
|
||||
dependencies = [
|
||||
"generic-array",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
]
|
||||
@ -935,7 +935,7 @@ version = "2.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e9b3460f44bea8cd47f45a0c70892f1eff856d97cd55358b2f73f663789f6190"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"getrandom 0.2.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -959,7 +959,7 @@ dependencies = [
|
||||
"hkdf",
|
||||
"pem-rfc7468",
|
||||
"pkcs8",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"sec1",
|
||||
"subtle",
|
||||
"zeroize",
|
||||
@ -1045,7 +1045,7 @@ version = "0.13.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
@ -1128,10 +1128,22 @@ dependencies = [
|
||||
"cfg-if",
|
||||
"js-sys",
|
||||
"libc",
|
||||
"wasi",
|
||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
||||
"wasm-bindgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
"wasi 0.13.3+wasi-0.2.2",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "git2"
|
||||
version = "0.20.0"
|
||||
@ -1960,7 +1972,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
|
||||
dependencies = [
|
||||
"ff",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"subtle",
|
||||
]
|
||||
|
||||
@ -2112,7 +2124,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af1955a75fa080c677d3972822ec4bad316169ab1cfc6c257a942c2265dbe5fe"
|
||||
dependencies = [
|
||||
"bitmaps",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"rand_xoshiro",
|
||||
"sized-chunks",
|
||||
"typenum",
|
||||
@ -2685,10 +2697,10 @@ checksum = "b719f62f9b77cfadf01500984ab26c7bda71b3f1e497e9dbb055ff466dbe2a86"
|
||||
dependencies = [
|
||||
"ct-codecs",
|
||||
"ed25519-compact",
|
||||
"getrandom",
|
||||
"getrandom 0.2.15",
|
||||
"orion",
|
||||
"p384",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
"regex",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -2865,8 +2877,8 @@ dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
"lazy_static",
|
||||
"num-traits",
|
||||
"rand",
|
||||
"rand_chacha",
|
||||
"rand 0.8.5",
|
||||
"rand_chacha 0.3.1",
|
||||
"rand_xorshift",
|
||||
"regex-syntax 0.8.4",
|
||||
"rusty-fork",
|
||||
@ -2914,8 +2926,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"rand_chacha",
|
||||
"rand_core",
|
||||
"rand_chacha 0.3.1",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3779b94aeb87e8bd4e834cee3650289ee9e0d5677f976ecdb6d219e5f4f6cd94"
|
||||
dependencies = [
|
||||
"rand_chacha 0.9.0",
|
||||
"rand_core 0.9.0",
|
||||
"zerocopy 0.8.14",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2925,7 +2948,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_chacha"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
|
||||
dependencies = [
|
||||
"ppv-lite86",
|
||||
"rand_core 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2934,7 +2967,17 @@ version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
dependencies = [
|
||||
"getrandom",
|
||||
"getrandom 0.2.15",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b08f3c9802962f7e1b25113931d94f43ed9725bebc59db9d0c3e9a23b67e15ff"
|
||||
dependencies = [
|
||||
"getrandom 0.3.1",
|
||||
"zerocopy 0.8.14",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2943,7 +2986,7 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -2952,7 +2995,7 @@ version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -3396,7 +3439,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
|
||||
dependencies = [
|
||||
"digest",
|
||||
"rand_core",
|
||||
"rand_core 0.6.4",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4012,6 +4055,15 @@ version = "0.11.0+wasi-snapshot-preview1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
||||
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.13.3+wasi-0.2.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2"
|
||||
dependencies = [
|
||||
"wit-bindgen-rt",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasm-bindgen"
|
||||
version = "0.2.92"
|
||||
@ -4264,6 +4316,15 @@ dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rt"
|
||||
version = "0.33.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c"
|
||||
dependencies = [
|
||||
"bitflags 2.6.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "xtask-build-man"
|
||||
version = "0.0.0"
|
||||
@ -4305,7 +4366,16 @@ version = "0.7.35"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0"
|
||||
dependencies = [
|
||||
"zerocopy-derive",
|
||||
"zerocopy-derive 0.7.35",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy"
|
||||
version = "0.8.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a367f292d93d4eab890745e75a778da40909cab4d6ff8173693812f79c4a2468"
|
||||
dependencies = [
|
||||
"zerocopy-derive 0.8.14",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -4319,6 +4389,17 @@ dependencies = [
|
||||
"syn 2.0.90",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zerocopy-derive"
|
||||
version = "0.8.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d3931cb58c62c13adec22e38686b559c86a30565e16ad6e8510a337cedc611e1"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.90",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "zeroize"
|
||||
version = "1.7.0"
|
||||
|
@ -78,7 +78,7 @@ percent-encoding = "2.3.1"
|
||||
pkg-config = "0.3.30"
|
||||
proptest = "1.5.0"
|
||||
pulldown-cmark = { version = "0.12.0", default-features = false, features = ["html"] }
|
||||
rand = "0.8.5"
|
||||
rand = "0.9.0"
|
||||
regex = "1.10.5"
|
||||
rusqlite = { version = "0.32.0", features = ["bundled"] }
|
||||
rustc-hash = "2.0.0"
|
||||
|
@ -16,7 +16,7 @@ use cargo::core::global_cache_tracker::{self, DeferredGlobalLastUse, GlobalCache
|
||||
use cargo::util::cache_lock::CacheLockMode;
|
||||
use cargo::util::interning::InternedString;
|
||||
use cargo::GlobalContext;
|
||||
use rand::prelude::SliceRandom;
|
||||
use rand::prelude::*;
|
||||
use std::collections::HashMap;
|
||||
use std::fs;
|
||||
use std::fs::File;
|
||||
@ -131,7 +131,7 @@ fn main() {
|
||||
let biggest = counts.last().unwrap().1;
|
||||
|
||||
src_entries.retain(|src| src.encoded_registry_name == biggest);
|
||||
let mut rng = &mut rand::thread_rng();
|
||||
let mut rng = &mut rand::rng();
|
||||
let sample: Vec<_> = src_entries.choose_multiple(&mut rng, 500).collect();
|
||||
let mut f = File::create(homedir.join("random-sample")).unwrap();
|
||||
for src in sample {
|
||||
|
@ -130,8 +130,8 @@ impl<'a> Retry<'a> {
|
||||
}
|
||||
|
||||
if self.retries == 1 {
|
||||
let mut rng = rand::thread_rng();
|
||||
INITIAL_RETRY_SLEEP_BASE_MS + rng.gen_range(0..INITIAL_RETRY_JITTER_MS)
|
||||
let mut rng = rand::rng();
|
||||
INITIAL_RETRY_SLEEP_BASE_MS + rng.random_range(0..INITIAL_RETRY_JITTER_MS)
|
||||
} else {
|
||||
min(
|
||||
((self.retries - 1) * 3) * 1000 + INITIAL_RETRY_SLEEP_BASE_MS,
|
||||
|
@ -3799,9 +3799,9 @@ internal server error
|
||||
fn rand_prefix() -> String {
|
||||
use rand::Rng;
|
||||
const CHARS: &[u8] = b"abcdefghijklmnopqrstuvwxyz";
|
||||
let mut rng = rand::thread_rng();
|
||||
let mut rng = rand::rng();
|
||||
(0..5)
|
||||
.map(|_| CHARS[rng.gen_range(0..CHARS.len())] as char)
|
||||
.map(|_| CHARS[rng.random_range(0..CHARS.len())] as char)
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user