From 8cb8398be99c3054dcb5b1a2bb59dd00b65baff9 Mon Sep 17 00:00:00 2001 From: cloudhead Date: Mon, 21 Aug 2023 11:32:23 +0200 Subject: [PATCH] Introduce `cargo-deny` Add `deny.toml` with a few exceptions, and update certain dependencies to get rid of duplicates. Running `cargo deny check` will yield some warnings still, but no errors. --- Cargo.lock | 292 +++++++++------------------ deny.toml | 124 ++++++++++++ radicle-cli/Cargo.toml | 2 +- radicle-cob/Cargo.toml | 4 +- radicle-cob/src/test/arbitrary.rs | 18 +- radicle-crdt/Cargo.toml | 5 +- radicle-crdt/src/test.rs | 6 +- radicle-crypto/Cargo.toml | 10 +- radicle-dag/Cargo.toml | 2 +- radicle-dag/src/lib.rs | 2 +- radicle-httpd/Cargo.toml | 8 +- radicle-httpd/src/api/v1/sessions.rs | 2 +- radicle-node/Cargo.toml | 4 +- radicle-node/src/test/simulator.rs | 18 +- radicle-term/Cargo.toml | 2 +- radicle/Cargo.toml | 4 +- radicle/src/collections.rs | 2 +- radicle/src/node/address/store.rs | 2 +- radicle/src/node/address/types.rs | 11 +- radicle/src/node/routing.rs | 2 +- radicle/src/test/arbitrary.rs | 11 +- radicle/src/test/fixtures.rs | 2 +- 22 files changed, 276 insertions(+), 257 deletions(-) create mode 100644 deny.toml diff --git a/Cargo.lock b/Cargo.lock index 54520952..882f74bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -58,6 +58,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "amplify" version = "4.0.0" @@ -183,18 +189,7 @@ checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", -] - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", + "syn 2.0.29", ] [[package]] @@ -205,9 +200,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "axum" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", "axum-core", @@ -267,9 +262,9 @@ dependencies = [ [[package]] name = "axum-server" -version = "0.4.7" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bace45b270e36e3c27a190c65883de6dfc9f1d18c829907c127464815dc67b24" +checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063" dependencies = [ "bytes", "futures-util", @@ -350,9 +345,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "block-buffer" @@ -411,11 +406,12 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cc" -version = "1.0.79" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ "jobserver", + "libc", ] [[package]] @@ -456,10 +452,7 @@ checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ "android-tzdata", "iana-time-zone", - "js-sys", "num-traits", - "time 0.1.45", - "wasm-bindgen", "winapi", ] @@ -482,11 +475,11 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] name = "colored" -version = "1.9.3" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" dependencies = [ - "atty", + "is-terminal", "lazy_static", "winapi", ] @@ -615,18 +608,6 @@ dependencies = [ "sha2 0.10.7", ] -[[package]] -name = "cyphernet" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c4cd4c5d6937b81f3df6bb26fe94b4d1c52dd2cfd85507d063d9892cd64448d" -dependencies = [ - "cypheraddr", - "cyphergraphy", - "eidolon-auth", - "socks5-client", -] - [[package]] name = "cyphernet" version = "0.3.0" @@ -705,9 +686,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.11" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30" +checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" [[package]] name = "ec25519" @@ -755,16 +736,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "eidolon-auth" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a764411b1ee8bcacb5203d24e9f0b2d192be62b23ea1c16d0e3462e103f3ffc" -dependencies = [ - "amplify", - "cyphergraphy", -] - [[package]] name = "elliptic-curve" version = "0.12.3" @@ -792,9 +763,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" dependencies = [ "errno-dragonfly", "libc", @@ -825,12 +796,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.9.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" [[package]] name = "ff" @@ -1037,20 +1005,15 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "headers" @@ -1077,15 +1040,6 @@ dependencies = [ "http", ] -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.2" @@ -1244,26 +1198,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys", -] - [[package]] name = "io-reactor" version = "0.2.1" @@ -1282,8 +1216,8 @@ version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.4", + "hermit-abi", + "rustix", "windows-sys", ] @@ -1390,15 +1324,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.3.8" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" - -[[package]] -name = "linux-raw-sys" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" [[package]] name = "localtime" @@ -1411,17 +1339,17 @@ dependencies = [ [[package]] name = "log" -version = "0.4.19" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "lru" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670" +checksum = "eedb2bdbad7e0634f83989bf596f497b070130daaa398ab22d84c39e266deec5" dependencies = [ - "hashbrown 0.13.2", + "hashbrown 0.14.0", ] [[package]] @@ -1489,7 +1417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f8216a05f756d0c7c02743812f6db7f5dccb7cfe9f2b2612f4aaf85c7eb641a" dependencies = [ "amplify", - "cyphernet 0.3.0", + "cyphernet", "io-reactor", "libc", "rand 0.8.5", @@ -1587,9 +1515,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", "libm", @@ -1601,7 +1529,7 @@ version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.3.2", + "hermit-abi", "libc", ] @@ -1701,7 +1629,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -1806,9 +1734,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" dependencies = [ "unicode-ident", ] @@ -1835,9 +1763,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -1848,7 +1776,7 @@ version = "0.2.0" dependencies = [ "amplify", "crossbeam-channel", - "cyphernet 0.2.0", + "cyphernet", "fastrand", "git2", "localtime", @@ -1955,7 +1883,7 @@ name = "radicle-crypto" version = "0.2.0" dependencies = [ "amplify", - "cyphernet 0.2.0", + "cyphernet", "ec25519", "fastrand", "multibase", @@ -2017,7 +1945,7 @@ dependencies = [ "serde_json", "tempfile", "thiserror", - "time 0.3.23", + "time", "tokio", "tower", "tower-http", @@ -2037,7 +1965,7 @@ dependencies = [ "chrono", "colored", "crossbeam-channel", - "cyphernet 0.3.0", + "cyphernet", "fastrand", "io-reactor", "lexopt", @@ -2315,28 +2243,14 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustix" -version = "0.37.23" +version = "0.38.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" +checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "linux-raw-sys 0.3.8", - "windows-sys", -] - -[[package]] -name = "rustix" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" -dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", "errno", "libc", - "linux-raw-sys 0.4.3", + "linux-raw-sys", "windows-sys", ] @@ -2389,22 +2303,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.171" +version = "1.0.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9" +checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.171" +version = "1.0.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682" +checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -2699,9 +2613,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.25" +version = "2.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2" +checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" dependencies = [ "proc-macro2", "quote", @@ -2727,15 +2641,14 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.6.0" +version = "3.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" +checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef" dependencies = [ - "autocfg", "cfg-if", "fastrand", "redox_syscall 0.3.5", - "rustix 0.37.23", + "rustix", "windows-sys", ] @@ -2765,22 +2678,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42" +checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f" +checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -2793,17 +2706,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "time" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi", -] - [[package]] name = "time" version = "0.3.23" @@ -2878,7 +2780,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -2963,7 +2865,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] [[package]] @@ -2993,7 +2895,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08aacc136419ba433b3f9bfd434a1bb62fe385328935e6ac11d952122b8a8cb" dependencies = [ - "time 0.3.23", + "time", "tracing", "tracing-core", "tracing-subscriber", @@ -3037,9 +2939,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" +checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" [[package]] name = "unicode-normalization" @@ -3136,12 +3038,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -3169,7 +3065,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", "wasm-bindgen-shared", ] @@ -3191,7 +3087,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3244,9 +3140,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -3259,45 +3155,45 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "xattr" @@ -3340,5 +3236,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.25", + "syn 2.0.29", ] diff --git a/deny.toml b/deny.toml new file mode 100644 index 00000000..f00f1218 --- /dev/null +++ b/deny.toml @@ -0,0 +1,124 @@ +# Note that all fields that take a lint level have these possible values: +# * deny - An error will be produced and the check will fail +# * warn - A warning will be produced, but the check will not fail +# * allow - No warning or error will be produced + +targets = [] + +# If true, metadata will be collected with `--all-features`. Note that this can't +# be toggled off if true, if you want to conditionally enable `--all-features` it +# is recommended to pass `--all-features` on the cmd line instead +all-features = false +# If true, metadata will be collected with `--no-default-features`. The same +# caveat with `all-features` applies +no-default-features = false +feature-depth = 1 + +# This section is considered when running `cargo deny check advisories` +[advisories] +# The path where the advisory database is cloned/fetched into +db-path = "~/.cargo/advisory-db" +# The url(s) of the advisory databases to use +db-urls = ["https://github.com/rustsec/advisory-db"] +# The lint level for security vulnerabilities +vulnerability = "deny" +# The lint level for unmaintained crates +unmaintained = "warn" +# The lint level for crates that have been yanked from their source registry. +yanked = "warn" +# The lint level for crates with security notices. +notice = "warn" +# A list of advisory IDs to ignore. Note that ignored advisories will still +# output a note when they are encountered. +ignore = [] + +# This section is considered when running `cargo deny check licenses` +[licenses] +# The lint level for crates which do not have a detectable license +unlicensed = "deny" +# List of explicitly allowed licenses +allow = [ + "MIT", + "Apache-2.0", + "Unicode-DFS-2016", + "BSD-3-Clause" +] +# List of explicitly disallowed licenses +deny = [] +# Lint level for licenses considered copyleft +copyleft = "warn" +allow-osi-fsf-free = "neither" +default = "deny" +# The confidence threshold for detecting a license from license text. +confidence-threshold = 0.8 +# Allow 1 or more licenses on a per-crate basis, so that particular licenses +# aren't accepted for every possible crate as with the normal allow list +exceptions = [ + { allow = ["GPL-3.0"], name = "radicle-surf", version = "*" }, + { allow = ["GPL-3.0"], name = "radicle-std-ext", version = "*" }, + { allow = ["GPL-3.0"], name = "radicle-git-ext", version = "*" }, + { allow = ["GPL-3.0"], name = "git-ref-format-core", version = "*" }, + { allow = ["GPL-3.0"], name = "git-ref-format-macro", version = "*" }, + { allow = ["GPL-3.0"], name = "git-ref-format", version = "*" }, +] + +[licenses.private] +# If true, ignores workspace crates that aren't published, or are only +# published to private registries. +ignore = false +registries = [] + +# This section is considered when running `cargo deny check bans`. +[bans] +# Lint level for when multiple versions of the same crate are detected +multiple-versions = "warn" +# Lint level for when a crate version requirement is `*` +wildcards = "allow" +# The graph highlighting used when creating dotgraphs for crates +# with multiple versions +# * lowest-version - The path to the lowest versioned duplicate is highlighted +# * simplest-path - The path to the version with the fewest edges is highlighted +# * all - Both lowest-version and simplest-path are used +highlight = "all" +# The default lint level for `default` features for crates that are members of +# the workspace that is being checked. This can be overridden by allowing/denying +# `default` on a crate-by-crate basis if desired. +workspace-default-features = "allow" +# The default lint level for `default` features for external crates that are not +# members of the workspace. This can be overridden by allowing/denying `default` +# on a crate-by-crate basis if desired. +external-default-features = "allow" +# List of crates that are allowed. Use with care! +allow = [] +# List of crates to deny +deny = [] + +# Certain crates/versions that will be skipped when doing duplicate detection. +skip = [] +# Similarly to `skip` allows you to skip certain crates during duplicate +# detection. Unlike skip, it also includes the entire tree of transitive +# dependencies starting at the specified crate, up to a certain depth, which is +# by default infinite. +skip-tree = [] + +# This section is considered when running `cargo deny check sources`. +[sources] +# Lint level for what to happen when a crate from a crate registry that is not +# in the allow list is encountered +unknown-registry = "warn" +# Lint level for what to happen when a crate from a git repository that is not +# in the allow list is encountered +unknown-git = "warn" +# List of URLs for allowed crate registries. Defaults to the crates.io index +# if not specified. If it is specified but empty, no registries are allowed. +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +# List of URLs for allowed Git repositories +allow-git = [] + +[sources.allow-org] +# 1 or more github.com organizations to allow git sources for +github = [] +# 1 or more gitlab.com organizations to allow git sources for +gitlab = [] +# 1 or more bitbucket.org organizations to allow git sources for +bitbucket = [] diff --git a/radicle-cli/Cargo.toml b/radicle-cli/Cargo.toml index 8cc3ad11..1b656fb9 100644 --- a/radicle-cli/Cargo.toml +++ b/radicle-cli/Cargo.toml @@ -12,7 +12,7 @@ path = "src/main.rs" [dependencies] anyhow = { version = "1" } -chrono = { version = "0.4", default-features = false, features = ["clock", "std"] } +chrono = { version = "0.4.26", default-features = false, features = ["clock", "std"] } git-ref-format = { version = "0.3.0", features = ["macro"] } json-color = { version = "0.7" } lexopt = { version = "0.2" } diff --git a/radicle-cob/Cargo.toml b/radicle-cob/Cargo.toml index ea716e77..c95a97e2 100644 --- a/radicle-cob/Cargo.toml +++ b/radicle-cob/Cargo.toml @@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0" keywords = ["radicle", "cob", "cobs"] [dependencies] -fastrand = { version = "1.9.0" } +fastrand = { version = "2.0.0" } log = { version = "0.4.17" } nonempty = { version = "0.8.1", features = ["serialize"] } once_cell = { version = "1.13" } @@ -40,7 +40,7 @@ version = "1.0" features = ["derive"] [dev-dependencies] -fastrand = { version = "1.9.0", default-features = false } +fastrand = { version = "2.0.0", default-features = false } tempfile = { version = "3" } qcheck = { version = "1", default-features = false } qcheck-macros = { version = "1", default-features = false } diff --git a/radicle-cob/src/test/arbitrary.rs b/radicle-cob/src/test/arbitrary.rs index 15d41cd2..123166a9 100644 --- a/radicle-cob/src/test/arbitrary.rs +++ b/radicle-cob/src/test/arbitrary.rs @@ -12,14 +12,11 @@ pub struct Invalid { impl Arbitrary for TypeName { fn arbitrary(g: &mut qcheck::Gen) -> Self { - let rng = fastrand::Rng::with_seed(u64::arbitrary(g)); + let mut rng = fastrand::Rng::with_seed(u64::arbitrary(g)); let mut name: Vec = Vec::new(); for _ in 0..rng.usize(1..5) { - name.push( - iter::repeat_with(|| rng.alphanumeric()) - .take(rng.usize(1..16)) - .collect(), - ); + let len = rng.usize(1..16); + name.push(iter::repeat_with(|| rng.alphanumeric()).take(len).collect()); } name.join(".") .parse::() @@ -29,7 +26,7 @@ impl Arbitrary for TypeName { impl Arbitrary for ObjectId { fn arbitrary(g: &mut qcheck::Gen) -> Self { - let rng = fastrand::Rng::with_seed(u64::arbitrary(g)); + let mut rng = fastrand::Rng::with_seed(u64::arbitrary(g)); let bytes = iter::repeat_with(|| rng.u8(..)) .take(20) .collect::>(); @@ -39,10 +36,9 @@ impl Arbitrary for ObjectId { impl Arbitrary for Invalid { fn arbitrary(g: &mut qcheck::Gen) -> Self { - let rng = fastrand::Rng::with_seed(u64::arbitrary(g)); - let value = iter::repeat_with(|| rng.alphanumeric()) - .take(rng.usize(21..50)) - .collect(); + let mut rng = fastrand::Rng::with_seed(u64::arbitrary(g)); + let len = rng.usize(21..50); + let value = iter::repeat_with(|| rng.alphanumeric()).take(len).collect(); Invalid { value, _marker: PhantomData, diff --git a/radicle-crdt/Cargo.toml b/radicle-crdt/Cargo.toml index f8cfd638..21d107b3 100644 --- a/radicle-crdt/Cargo.toml +++ b/radicle-crdt/Cargo.toml @@ -1,13 +1,14 @@ [package] name = "radicle-crdt" version = "0.1.0" +license = "MIT OR Apache-2.0" edition = "2021" [features] test = ["fastrand", "qcheck"] [dependencies] -fastrand = { version = "1.9.0", optional = true } +fastrand = { version = "2.0.0", optional = true } num-traits = { version = "0.2.15", default-features = false, features = ["std"] } qcheck = { version = "1", optional = true } serde = { version = "1" } @@ -19,7 +20,7 @@ version = "0" features = [] [dev-dependencies] -fastrand = { version = "1.9.0" } +fastrand = { version = "2.0.0" } qcheck = { version = "1" } qcheck-macros = { version = "1" } radicle-crypto = { path = "../radicle-crypto", features = ["test"] } diff --git a/radicle-crdt/src/test.rs b/radicle-crdt/src/test.rs index 07018ef0..b4a51acc 100644 --- a/radicle-crdt/src/test.rs +++ b/radicle-crdt/src/test.rs @@ -104,8 +104,8 @@ fn test_generator() { let c = values.iter().filter(|c| **c == 'c').count(); let d = values.iter().filter(|c| **c == 'd').count(); - assert_eq!(a, 79); - assert_eq!(b, 122); + assert_eq!(a, 77); + assert_eq!(b, 120); assert_eq!(c, 285); - assert_eq!(d, 514); + assert_eq!(d, 518); } diff --git a/radicle-crypto/Cargo.toml b/radicle-crypto/Cargo.toml index fa256108..357a24dd 100644 --- a/radicle-crypto/Cargo.toml +++ b/radicle-crypto/Cargo.toml @@ -17,7 +17,8 @@ ssh = ["radicle-ssh", "ssh-key"] [dependencies] amplify = { version = "4.0.0" } -cyphernet = { version = "0.2.0", optional = true, features = ["ed25519"] } +cyphernet = { version = "0.3.0", optional = true, features = ["ed25519"] } +fastrand = { version = "2.0.0", default-features = false, optional = true } multibase = { version = "0.9.1" } ec25519 = { version = "0.1.0", features = [] } serde = { version = "1", features = ["derive"] } @@ -25,11 +26,6 @@ sqlite = { version = "0.31.0", optional = true } thiserror = { version = "1" } zeroize = { version = "1.5.7" } -[dependencies.fastrand] -version = "1.8.0" -default-features = false -optional = true - [dependencies.radicle-git-ext] version = "0.6.0" default-features = false @@ -53,7 +49,7 @@ default-features = false optional = true [dev-dependencies] -fastrand = { version = "1.8.0", default-features = false } +fastrand = { version = "2.0.0", default-features = false } qcheck-macros = { version = "1", default-features = false } qcheck = { version = "1", default-features = false } tempfile = { version = "3.3.0" } diff --git a/radicle-dag/Cargo.toml b/radicle-dag/Cargo.toml index 4943c348..ee07f2ac 100644 --- a/radicle-dag/Cargo.toml +++ b/radicle-dag/Cargo.toml @@ -9,4 +9,4 @@ version = "0.2.0" edition = "2021" [dependencies] -fastrand = { version = "1.9.0" } +fastrand = { version = "2.0.0" } diff --git a/radicle-dag/src/lib.rs b/radicle-dag/src/lib.rs index 3b8cb0d3..33f1d3ef 100644 --- a/radicle-dag/src/lib.rs +++ b/radicle-dag/src/lib.rs @@ -460,7 +460,7 @@ mod tests { [5, 4, 2, 3, 1, 0], ]; let mut sorts = BTreeSet::new(); - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); while sorts.len() < expected.len() { sorts.insert(dag.sorted(|a, b| if rng.bool() { a.cmp(b) } else { b.cmp(a) })); diff --git a/radicle-httpd/Cargo.toml b/radicle-httpd/Cargo.toml index 72dbbbe9..ad94e627 100644 --- a/radicle-httpd/Cargo.toml +++ b/radicle-httpd/Cargo.toml @@ -18,13 +18,13 @@ logfmt = [ anyhow = { version = "1" } axum = { version = "0.6.7", default-features = false, features = ["headers", "json", "query", "tokio"] } axum-auth = { version= "0.4.0", default-features = false, features = ["auth-bearer"] } -axum-server = { version = "0.4.4", default-features = false } -chrono = { version = "0.4.22" } -fastrand = { version = "1.9.0" } +axum-server = { version = "0.5.1", default-features = false } +chrono = { version = "0.4.22", default-features = false } +fastrand = { version = "2.0.0" } flate2 = { version = "1" } hyper = { version = "0.14.17", default-features = false } lexopt = { version = "0.2.1" } -lru = { version = "0.10.0" } +lru = { version = "0.11.0" } nonempty = { version = "0.8.1", features = ["serialize"] } radicle-surf = { version = "0.14.0", default-features = false, features = ["serde"] } serde = { version = "1", features = ["derive"] } diff --git a/radicle-httpd/src/api/v1/sessions.rs b/radicle-httpd/src/api/v1/sessions.rs index 340951fb..9e99f9e2 100644 --- a/radicle-httpd/src/api/v1/sessions.rs +++ b/radicle-httpd/src/api/v1/sessions.rs @@ -37,7 +37,7 @@ struct AuthChallenge { /// Create session. /// `POST /sessions` async fn session_create_handler(State(ctx): State) -> impl IntoResponse { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); let session_id = repeat_with(|| rng.alphanumeric()) .take(32) .collect::(); diff --git a/radicle-node/Cargo.toml b/radicle-node/Cargo.toml index 0492cc48..895e43ce 100644 --- a/radicle-node/Cargo.toml +++ b/radicle-node/Cargo.toml @@ -14,11 +14,11 @@ amplify = { version = "4.0.0" } anyhow = { version = "1" } bloomy = { version = "1.2" } byteorder = { version = "1" } -chrono = { version = "0.4.0" } +chrono = { version = "0.4.0", default-features = false } colored = { version = "1.9.0" } crossbeam-channel = { version = "0.5.6" } cyphernet = { version = "0.3.0", features = ["tor", "dns", "ed25519", "p2p-ed25519"] } -fastrand = { version = "1.9.0" } +fastrand = { version = "2.0.0" } io-reactor = { version = "0.2.1", features = ["popol"] } lexopt = { version = "0.2.1" } libc = { version = "0.2.137" } diff --git a/radicle-node/src/test/simulator.rs b/radicle-node/src/test/simulator.rs index 37473825..2d7abbf1 100644 --- a/radicle-node/src/test/simulator.rs +++ b/radicle-node/src/test/simulator.rs @@ -3,6 +3,7 @@ #![allow(dead_code)] #![allow(clippy::type_complexity)] +use std::cell::RefCell; use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque}; use std::marker::PhantomData; use std::ops::{Deref, DerefMut, Range}; @@ -195,7 +196,7 @@ pub struct Simulation { /// Current simulation time. Updated when a scheduled message is processed. time: LocalTime, /// RNG. - rng: fastrand::Rng, + rng: RefCell, /// Storage type. storage: PhantomData, /// Signer type. @@ -218,7 +219,7 @@ impl Simulation { opts, start_time: time, time, - rng, + rng: RefCell::new(rng), storage: PhantomData, signer: PhantomData, } @@ -255,6 +256,8 @@ impl Simulation { .get(&(from, to)) .cloned() .map(|l| { + let mut rng = self.rng.borrow_mut(); + if l <= MIN_LATENCY { l } else { @@ -262,12 +265,12 @@ impl Simulation { // will be between half, and two times the base latency. let millis = l.as_millis(); - if self.rng.bool() { + if rng.bool() { // More latency. - LocalDuration::from_millis(millis + self.rng.u128(0..millis)) + LocalDuration::from_millis(millis + rng.u128(0..millis)) } else { // Less latency. - LocalDuration::from_millis(millis - self.rng.u128(0..millis / 2)) + LocalDuration::from_millis(millis - rng.u128(0..millis / 2)) } } }) @@ -318,6 +321,7 @@ impl Simulation { let range = self.opts.latency.clone(); let latency = LocalDuration::from_millis( self.rng + .borrow_mut() .u128(range.start as u128 * 1_000..range.end as u128 * 1_000), ); @@ -515,7 +519,7 @@ impl Simulation { log::info!(target: "sim", "{} -/-> {} (partitioned)", node, remote); // Sometimes, the service gets a failure input, other times it just hangs. - if self.rng.bool() { + if self.rng.borrow_mut().bool() { self.inbox.insert( self.time + MIN_LATENCY, Scheduled { @@ -668,7 +672,7 @@ impl Simulation { /// Check whether we should fail the next operation. fn is_fallible(&self) -> bool { - self.rng.f64() % 1.0 < self.opts.failure_rate + self.rng.borrow_mut().f64() % 1.0 < self.opts.failure_rate } /// Check whether two nodes are partitioned. diff --git a/radicle-term/Cargo.toml b/radicle-term/Cargo.toml index 26e01ae0..2bc16180 100644 --- a/radicle-term/Cargo.toml +++ b/radicle-term/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" [dependencies] anyhow = { version = "1" } anstyle-query = { version = "1.0.0" } -inquire = { version = "0.6", default-features = false, features = ["termion", "editor"] } +inquire = { version = "0.6.2", default-features = false, features = ["termion", "editor"] } libc = { version = "0.2" } once_cell = { version = "1.13" } termion = { version = "2" } diff --git a/radicle/Cargo.toml b/radicle/Cargo.toml index 10d7f0d2..b4885dfb 100644 --- a/radicle/Cargo.toml +++ b/radicle/Cargo.toml @@ -15,8 +15,8 @@ test = ["qcheck", "radicle-crypto/test"] [dependencies] amplify = { version = "4.0.0", default-features = false, features = ["std"] } crossbeam-channel = { version = "0.5.6" } -cyphernet = { version = "0.2.0", features = ["tor", "dns", "p2p-ed25519"] } -fastrand = { version = "1.9.0" } +cyphernet = { version = "0.3.0", features = ["tor", "dns", "p2p-ed25519"] } +fastrand = { version = "2.0.0" } multibase = { version = "0.9.1" } localtime = { version = "1.2.0", features = ["serde"] } log = { version = "0.4.17", features = ["std"] } diff --git a/radicle/src/collections.rs b/radicle/src/collections.rs index ccd1994d..15ddddfd 100644 --- a/radicle/src/collections.rs +++ b/radicle/src/collections.rs @@ -21,7 +21,7 @@ impl Default for RandomState { } impl RandomState { - fn new(rng: fastrand::Rng) -> Self { + fn new(mut rng: fastrand::Rng) -> Self { Self { key1: rng.u64(..), key2: rng.u64(..), diff --git a/radicle/src/node/address/store.rs b/radicle/src/node/address/store.rs index 98f7d48c..9307662a 100644 --- a/radicle/src/node/address/store.rs +++ b/radicle/src/node/address/store.rs @@ -580,7 +580,7 @@ mod test { #[test] fn test_entries() { let ids = arbitrary::vec::(16); - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); let mut cache = Book::memory().unwrap(); let mut expected = Vec::new(); let timestamp = LocalTime::now().as_millis(); diff --git a/radicle/src/node/address/types.rs b/radicle/src/node/address/types.rs index 133276c7..d4f1f564 100644 --- a/radicle/src/node/address/types.rs +++ b/radicle/src/node/address/types.rs @@ -1,3 +1,4 @@ +use std::cell::RefCell; use std::hash; use std::ops::{Deref, DerefMut}; @@ -15,7 +16,7 @@ use crate::prelude::Timestamp; pub struct AddressBook { inner: RandomMap, #[serde(skip)] - rng: fastrand::Rng, + rng: RefCell, } impl AddressBook { @@ -23,7 +24,7 @@ impl AddressBook { pub fn new(rng: fastrand::Rng) -> Self { Self { inner: RandomMap::with_hasher(rng.clone().into()), - rng, + rng: RefCell::new(rng), } } @@ -40,7 +41,7 @@ impl AddressBook { .filter(|(k, v)| predicate(*k, *v)) .collect(), ) { - let ix = self.rng.usize(..pairs.len()); + let ix = self.rng.borrow_mut().usize(..pairs.len()); let pair = pairs[ix]; // Can't fail. Some(pair) @@ -53,7 +54,7 @@ impl AddressBook { pub fn with(self, rng: fastrand::Rng) -> Self { Self { inner: self.inner, - rng, + rng: RefCell::new(rng), } } } @@ -63,7 +64,7 @@ impl AddressBook { pub fn shuffled(&self) -> std::vec::IntoIter<(&K, &V)> { let mut items = self.inner.iter().collect::>(); items.sort_by_key(|(k, _)| *k); - self.rng.shuffle(&mut items); + self.rng.borrow_mut().shuffle(&mut items); items.into_iter() } diff --git a/radicle/src/node/routing.rs b/radicle/src/node/routing.rs index ce7f00a3..8d021969 100644 --- a/radicle/src/node/routing.rs +++ b/radicle/src/node/routing.rs @@ -454,7 +454,7 @@ mod test { #[test] fn test_prune() { - let rng = fastrand::Rng::new(); + let mut rng = fastrand::Rng::new(); let now = LocalTime::now(); let ids = arbitrary::vec::(10); let nodes = arbitrary::vec::(10); diff --git a/radicle/src/test/arbitrary.rs b/radicle/src/test/arbitrary.rs index 693b1bc8..9c776699 100644 --- a/radicle/src/test/arbitrary.rs +++ b/radicle/src/test/arbitrary.rs @@ -97,15 +97,16 @@ impl Arbitrary for Did { impl Arbitrary for Project { fn arbitrary(g: &mut qcheck::Gen) -> Self { - let rng = fastrand::Rng::with_seed(u64::arbitrary(g)); + let mut rng = fastrand::Rng::with_seed(u64::arbitrary(g)); + let length = rng.usize(1..16); let name = iter::repeat_with(|| rng.alphanumeric()) - .take(rng.usize(1..16)) + .take(length) .collect(); let description = iter::repeat_with(|| rng.alphanumeric()) - .take(rng.usize(0..32)) + .take(length * 2) .collect(); let default_branch: git::RefString = iter::repeat_with(|| rng.alphanumeric()) - .take(rng.usize(1..16)) + .take(length) .collect::() .try_into() .unwrap(); @@ -125,7 +126,7 @@ impl Arbitrary for Doc { impl Arbitrary for Doc { fn arbitrary(g: &mut qcheck::Gen) -> Self { - let rng = fastrand::Rng::with_seed(u64::arbitrary(g)); + let mut rng = fastrand::Rng::with_seed(u64::arbitrary(g)); let project = Project::arbitrary(g); let delegates: NonEmpty<_> = iter::repeat_with(|| Did::arbitrary(g)) .take(rng.usize(1..6)) diff --git a/radicle/src/test/fixtures.rs b/radicle/src/test/fixtures.rs index ef411c5a..8ca142b0 100644 --- a/radicle/src/test/fixtures.rs +++ b/radicle/src/test/fixtures.rs @@ -95,7 +95,7 @@ pub fn populate(repo: &git2::Repository, scale: usize) -> Vec { return vec![]; } let head = repo.head().unwrap().peel_to_commit().unwrap(); - let rng = fastrand::Rng::with_seed(42); + let mut rng = fastrand::Rng::with_seed(42); let mut buffer = vec![0; 1024 * 1024 * scale]; let mut refs = Vec::new();