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.
This commit is contained in:
parent
534503d002
commit
8cb8398be9
|
|
@ -58,6 +58,12 @@ dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "allocator-api2"
|
||||||
|
version = "0.2.16"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "amplify"
|
name = "amplify"
|
||||||
version = "4.0.0"
|
version = "4.0.0"
|
||||||
|
|
@ -183,18 +189,7 @@ checksum = "a564d521dd56509c4c47480d00b80ee55f7e385ae48db5744c67ad50c92d2ebf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
|
||||||
|
|
||||||
[[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",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -205,9 +200,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum"
|
name = "axum"
|
||||||
version = "0.6.18"
|
version = "0.6.20"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f8175979259124331c1d7bf6586ee7e0da434155e4b2d48ec2c8386281d8df39"
|
checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"axum-core",
|
"axum-core",
|
||||||
|
|
@ -267,9 +262,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum-server"
|
name = "axum-server"
|
||||||
version = "0.4.7"
|
version = "0.5.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bace45b270e36e3c27a190c65883de6dfc9f1d18c829907c127464815dc67b24"
|
checksum = "447f28c85900215cc1bea282f32d4a2f22d55c5a300afdfbc661c8d6a632e063"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
|
@ -350,9 +345,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bitflags"
|
name = "bitflags"
|
||||||
version = "2.3.3"
|
version = "2.4.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42"
|
checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "block-buffer"
|
name = "block-buffer"
|
||||||
|
|
@ -411,11 +406,12 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.0.79"
|
version = "1.0.83"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
|
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"jobserver",
|
"jobserver",
|
||||||
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -456,10 +452,7 @@ checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"android-tzdata",
|
"android-tzdata",
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
"js-sys",
|
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"time 0.1.45",
|
|
||||||
"wasm-bindgen",
|
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -482,11 +475,11 @@ checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "colored"
|
name = "colored"
|
||||||
version = "1.9.3"
|
version = "1.9.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59"
|
checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atty",
|
"is-terminal",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
@ -615,18 +608,6 @@ dependencies = [
|
||||||
"sha2 0.10.7",
|
"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]]
|
[[package]]
|
||||||
name = "cyphernet"
|
name = "cyphernet"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
|
|
@ -705,9 +686,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dyn-clone"
|
name = "dyn-clone"
|
||||||
version = "1.0.11"
|
version = "1.0.13"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
|
checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ec25519"
|
name = "ec25519"
|
||||||
|
|
@ -755,16 +736,6 @@ dependencies = [
|
||||||
"zeroize",
|
"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]]
|
[[package]]
|
||||||
name = "elliptic-curve"
|
name = "elliptic-curve"
|
||||||
version = "0.12.3"
|
version = "0.12.3"
|
||||||
|
|
@ -792,9 +763,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "errno"
|
name = "errno"
|
||||||
version = "0.3.1"
|
version = "0.3.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
|
checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"errno-dragonfly",
|
"errno-dragonfly",
|
||||||
"libc",
|
"libc",
|
||||||
|
|
@ -825,12 +796,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "fastrand"
|
name = "fastrand"
|
||||||
version = "1.9.0"
|
version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
|
checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
|
||||||
dependencies = [
|
|
||||||
"instant",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ff"
|
name = "ff"
|
||||||
|
|
@ -1037,20 +1005,15 @@ version = "0.12.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hashbrown"
|
|
||||||
version = "0.13.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
|
|
||||||
dependencies = [
|
|
||||||
"ahash",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.14.0"
|
version = "0.14.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
|
checksum = "2c6201b9ff9fd90a5a3bac2e56a830d0caa509576f0e503818ee82c181b3437a"
|
||||||
|
dependencies = [
|
||||||
|
"ahash",
|
||||||
|
"allocator-api2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "headers"
|
name = "headers"
|
||||||
|
|
@ -1077,15 +1040,6 @@ dependencies = [
|
||||||
"http",
|
"http",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "hermit-abi"
|
|
||||||
version = "0.1.19"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hermit-abi"
|
name = "hermit-abi"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
|
|
@ -1244,26 +1198,6 @@ dependencies = [
|
||||||
"unicode-width",
|
"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]]
|
[[package]]
|
||||||
name = "io-reactor"
|
name = "io-reactor"
|
||||||
version = "0.2.1"
|
version = "0.2.1"
|
||||||
|
|
@ -1282,8 +1216,8 @@ version = "0.4.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
|
checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hermit-abi 0.3.2",
|
"hermit-abi",
|
||||||
"rustix 0.38.4",
|
"rustix",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1390,15 +1324,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.3.8"
|
version = "0.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519"
|
checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "linux-raw-sys"
|
|
||||||
version = "0.4.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "localtime"
|
name = "localtime"
|
||||||
|
|
@ -1411,17 +1339,17 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.19"
|
version = "0.4.20"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4"
|
checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lru"
|
name = "lru"
|
||||||
version = "0.10.1"
|
version = "0.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "718e8fae447df0c7e1ba7f5189829e63fd536945c8988d61444c19039f16b670"
|
checksum = "eedb2bdbad7e0634f83989bf596f497b070130daaa398ab22d84c39e266deec5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hashbrown 0.13.2",
|
"hashbrown 0.14.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1489,7 +1417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1f8216a05f756d0c7c02743812f6db7f5dccb7cfe9f2b2612f4aaf85c7eb641a"
|
checksum = "1f8216a05f756d0c7c02743812f6db7f5dccb7cfe9f2b2612f4aaf85c7eb641a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amplify",
|
"amplify",
|
||||||
"cyphernet 0.3.0",
|
"cyphernet",
|
||||||
"io-reactor",
|
"io-reactor",
|
||||||
"libc",
|
"libc",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
|
|
@ -1587,9 +1515,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "num-traits"
|
name = "num-traits"
|
||||||
version = "0.2.15"
|
version = "0.2.16"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
|
checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"libm",
|
"libm",
|
||||||
|
|
@ -1601,7 +1529,7 @@ version = "1.16.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"hermit-abi 0.3.2",
|
"hermit-abi",
|
||||||
"libc",
|
"libc",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1701,7 +1629,7 @@ checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1806,9 +1734,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.64"
|
version = "1.0.66"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da"
|
checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
@ -1835,9 +1763,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.29"
|
version = "1.0.33"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105"
|
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
|
|
@ -1848,7 +1776,7 @@ version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amplify",
|
"amplify",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"cyphernet 0.2.0",
|
"cyphernet",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"git2",
|
"git2",
|
||||||
"localtime",
|
"localtime",
|
||||||
|
|
@ -1955,7 +1883,7 @@ name = "radicle-crypto"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"amplify",
|
"amplify",
|
||||||
"cyphernet 0.2.0",
|
"cyphernet",
|
||||||
"ec25519",
|
"ec25519",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"multibase",
|
"multibase",
|
||||||
|
|
@ -2017,7 +1945,7 @@ dependencies = [
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"time 0.3.23",
|
"time",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tower",
|
"tower",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
|
|
@ -2037,7 +1965,7 @@ dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"colored",
|
"colored",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"cyphernet 0.3.0",
|
"cyphernet",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"io-reactor",
|
"io-reactor",
|
||||||
"lexopt",
|
"lexopt",
|
||||||
|
|
@ -2315,28 +2243,14 @@ checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustix"
|
name = "rustix"
|
||||||
version = "0.37.23"
|
version = "0.38.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06"
|
checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bitflags 1.3.2",
|
"bitflags 2.4.0",
|
||||||
"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",
|
|
||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys 0.4.3",
|
"linux-raw-sys",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2389,22 +2303,22 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.171"
|
version = "1.0.185"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9"
|
checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.171"
|
version = "1.0.185"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682"
|
checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2699,9 +2613,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.25"
|
version = "2.0.29"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "15e3fc8c0c74267e2df136e5e5fb656a464158aa57624053375eb9c8c6e25ae2"
|
checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -2727,15 +2641,14 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.6.0"
|
version = "3.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6"
|
checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"fastrand",
|
"fastrand",
|
||||||
"redox_syscall 0.3.5",
|
"redox_syscall 0.3.5",
|
||||||
"rustix 0.37.23",
|
"rustix",
|
||||||
"windows-sys",
|
"windows-sys",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2765,22 +2678,22 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror"
|
name = "thiserror"
|
||||||
version = "1.0.43"
|
version = "1.0.47"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a35fc5b8971143ca348fa6df4f024d4d55264f3468c71ad1c2f365b0a4d58c42"
|
checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"thiserror-impl",
|
"thiserror-impl",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "thiserror-impl"
|
name = "thiserror-impl"
|
||||||
version = "1.0.43"
|
version = "1.0.47"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "463fe12d7993d3b327787537ce8dd4dfa058de32fc2b195ef3cde03dc4771e8f"
|
checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2793,17 +2706,6 @@ dependencies = [
|
||||||
"once_cell",
|
"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]]
|
[[package]]
|
||||||
name = "time"
|
name = "time"
|
||||||
version = "0.3.23"
|
version = "0.3.23"
|
||||||
|
|
@ -2878,7 +2780,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2963,7 +2865,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -2993,7 +2895,7 @@ version = "0.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c08aacc136419ba433b3f9bfd434a1bb62fe385328935e6ac11d952122b8a8cb"
|
checksum = "c08aacc136419ba433b3f9bfd434a1bb62fe385328935e6ac11d952122b8a8cb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"time 0.3.23",
|
"time",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-core",
|
"tracing-core",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
|
|
@ -3037,9 +2939,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.10"
|
version = "1.0.11"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73"
|
checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-normalization"
|
name = "unicode-normalization"
|
||||||
|
|
@ -3136,12 +3038,6 @@ version = "0.9.0+wasi-snapshot-preview1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
|
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]]
|
[[package]]
|
||||||
name = "wasi"
|
name = "wasi"
|
||||||
version = "0.11.0+wasi-snapshot-preview1"
|
version = "0.11.0+wasi-snapshot-preview1"
|
||||||
|
|
@ -3169,7 +3065,7 @@ dependencies = [
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -3191,7 +3087,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
@ -3244,9 +3140,9 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-targets"
|
name = "windows-targets"
|
||||||
version = "0.48.1"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f"
|
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows_aarch64_gnullvm",
|
"windows_aarch64_gnullvm",
|
||||||
"windows_aarch64_msvc",
|
"windows_aarch64_msvc",
|
||||||
|
|
@ -3259,45 +3155,45 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_gnullvm"
|
name = "windows_aarch64_gnullvm"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc"
|
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_aarch64_msvc"
|
name = "windows_aarch64_msvc"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3"
|
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_gnu"
|
name = "windows_i686_gnu"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241"
|
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_i686_msvc"
|
name = "windows_i686_msvc"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00"
|
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnu"
|
name = "windows_x86_64_gnu"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1"
|
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_gnullvm"
|
name = "windows_x86_64_gnullvm"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953"
|
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows_x86_64_msvc"
|
name = "windows_x86_64_msvc"
|
||||||
version = "0.48.0"
|
version = "0.48.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
|
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "xattr"
|
name = "xattr"
|
||||||
|
|
@ -3340,5 +3236,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.25",
|
"syn 2.0.29",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -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 = []
|
||||||
|
|
@ -12,7 +12,7 @@ path = "src/main.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = { version = "1" }
|
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"] }
|
git-ref-format = { version = "0.3.0", features = ["macro"] }
|
||||||
json-color = { version = "0.7" }
|
json-color = { version = "0.7" }
|
||||||
lexopt = { version = "0.2" }
|
lexopt = { version = "0.2" }
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ license = "MIT OR Apache-2.0"
|
||||||
keywords = ["radicle", "cob", "cobs"]
|
keywords = ["radicle", "cob", "cobs"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fastrand = { version = "1.9.0" }
|
fastrand = { version = "2.0.0" }
|
||||||
log = { version = "0.4.17" }
|
log = { version = "0.4.17" }
|
||||||
nonempty = { version = "0.8.1", features = ["serialize"] }
|
nonempty = { version = "0.8.1", features = ["serialize"] }
|
||||||
once_cell = { version = "1.13" }
|
once_cell = { version = "1.13" }
|
||||||
|
|
@ -40,7 +40,7 @@ version = "1.0"
|
||||||
features = ["derive"]
|
features = ["derive"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
fastrand = { version = "1.9.0", default-features = false }
|
fastrand = { version = "2.0.0", default-features = false }
|
||||||
tempfile = { version = "3" }
|
tempfile = { version = "3" }
|
||||||
qcheck = { version = "1", default-features = false }
|
qcheck = { version = "1", default-features = false }
|
||||||
qcheck-macros = { version = "1", default-features = false }
|
qcheck-macros = { version = "1", default-features = false }
|
||||||
|
|
|
||||||
|
|
@ -12,14 +12,11 @@ pub struct Invalid<T> {
|
||||||
|
|
||||||
impl Arbitrary for TypeName {
|
impl Arbitrary for TypeName {
|
||||||
fn arbitrary(g: &mut qcheck::Gen) -> Self {
|
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<String> = Vec::new();
|
let mut name: Vec<String> = Vec::new();
|
||||||
for _ in 0..rng.usize(1..5) {
|
for _ in 0..rng.usize(1..5) {
|
||||||
name.push(
|
let len = rng.usize(1..16);
|
||||||
iter::repeat_with(|| rng.alphanumeric())
|
name.push(iter::repeat_with(|| rng.alphanumeric()).take(len).collect());
|
||||||
.take(rng.usize(1..16))
|
|
||||||
.collect(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
name.join(".")
|
name.join(".")
|
||||||
.parse::<TypeName>()
|
.parse::<TypeName>()
|
||||||
|
|
@ -29,7 +26,7 @@ impl Arbitrary for TypeName {
|
||||||
|
|
||||||
impl Arbitrary for ObjectId {
|
impl Arbitrary for ObjectId {
|
||||||
fn arbitrary(g: &mut qcheck::Gen) -> Self {
|
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(..))
|
let bytes = iter::repeat_with(|| rng.u8(..))
|
||||||
.take(20)
|
.take(20)
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
@ -39,10 +36,9 @@ impl Arbitrary for ObjectId {
|
||||||
|
|
||||||
impl Arbitrary for Invalid<ObjectId> {
|
impl Arbitrary for Invalid<ObjectId> {
|
||||||
fn arbitrary(g: &mut qcheck::Gen) -> Self {
|
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 value = iter::repeat_with(|| rng.alphanumeric())
|
let len = rng.usize(21..50);
|
||||||
.take(rng.usize(21..50))
|
let value = iter::repeat_with(|| rng.alphanumeric()).take(len).collect();
|
||||||
.collect();
|
|
||||||
Invalid {
|
Invalid {
|
||||||
value,
|
value,
|
||||||
_marker: PhantomData,
|
_marker: PhantomData,
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
[package]
|
[package]
|
||||||
name = "radicle-crdt"
|
name = "radicle-crdt"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
test = ["fastrand", "qcheck"]
|
test = ["fastrand", "qcheck"]
|
||||||
|
|
||||||
[dependencies]
|
[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"] }
|
num-traits = { version = "0.2.15", default-features = false, features = ["std"] }
|
||||||
qcheck = { version = "1", optional = true }
|
qcheck = { version = "1", optional = true }
|
||||||
serde = { version = "1" }
|
serde = { version = "1" }
|
||||||
|
|
@ -19,7 +20,7 @@ version = "0"
|
||||||
features = []
|
features = []
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
fastrand = { version = "1.9.0" }
|
fastrand = { version = "2.0.0" }
|
||||||
qcheck = { version = "1" }
|
qcheck = { version = "1" }
|
||||||
qcheck-macros = { version = "1" }
|
qcheck-macros = { version = "1" }
|
||||||
radicle-crypto = { path = "../radicle-crypto", features = ["test"] }
|
radicle-crypto = { path = "../radicle-crypto", features = ["test"] }
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,8 @@ fn test_generator() {
|
||||||
let c = values.iter().filter(|c| **c == 'c').count();
|
let c = values.iter().filter(|c| **c == 'c').count();
|
||||||
let d = values.iter().filter(|c| **c == 'd').count();
|
let d = values.iter().filter(|c| **c == 'd').count();
|
||||||
|
|
||||||
assert_eq!(a, 79);
|
assert_eq!(a, 77);
|
||||||
assert_eq!(b, 122);
|
assert_eq!(b, 120);
|
||||||
assert_eq!(c, 285);
|
assert_eq!(c, 285);
|
||||||
assert_eq!(d, 514);
|
assert_eq!(d, 518);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,8 @@ ssh = ["radicle-ssh", "ssh-key"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
amplify = { version = "4.0.0" }
|
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" }
|
multibase = { version = "0.9.1" }
|
||||||
ec25519 = { version = "0.1.0", features = [] }
|
ec25519 = { version = "0.1.0", features = [] }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
@ -25,11 +26,6 @@ sqlite = { version = "0.31.0", optional = true }
|
||||||
thiserror = { version = "1" }
|
thiserror = { version = "1" }
|
||||||
zeroize = { version = "1.5.7" }
|
zeroize = { version = "1.5.7" }
|
||||||
|
|
||||||
[dependencies.fastrand]
|
|
||||||
version = "1.8.0"
|
|
||||||
default-features = false
|
|
||||||
optional = true
|
|
||||||
|
|
||||||
[dependencies.radicle-git-ext]
|
[dependencies.radicle-git-ext]
|
||||||
version = "0.6.0"
|
version = "0.6.0"
|
||||||
default-features = false
|
default-features = false
|
||||||
|
|
@ -53,7 +49,7 @@ default-features = false
|
||||||
optional = true
|
optional = true
|
||||||
|
|
||||||
[dev-dependencies]
|
[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-macros = { version = "1", default-features = false }
|
||||||
qcheck = { version = "1", default-features = false }
|
qcheck = { version = "1", default-features = false }
|
||||||
tempfile = { version = "3.3.0" }
|
tempfile = { version = "3.3.0" }
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,4 @@ version = "0.2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
fastrand = { version = "1.9.0" }
|
fastrand = { version = "2.0.0" }
|
||||||
|
|
|
||||||
|
|
@ -460,7 +460,7 @@ mod tests {
|
||||||
[5, 4, 2, 3, 1, 0],
|
[5, 4, 2, 3, 1, 0],
|
||||||
];
|
];
|
||||||
let mut sorts = BTreeSet::new();
|
let mut sorts = BTreeSet::new();
|
||||||
let rng = fastrand::Rng::new();
|
let mut rng = fastrand::Rng::new();
|
||||||
|
|
||||||
while sorts.len() < expected.len() {
|
while sorts.len() < expected.len() {
|
||||||
sorts.insert(dag.sorted(|a, b| if rng.bool() { a.cmp(b) } else { b.cmp(a) }));
|
sorts.insert(dag.sorted(|a, b| if rng.bool() { a.cmp(b) } else { b.cmp(a) }));
|
||||||
|
|
|
||||||
|
|
@ -18,13 +18,13 @@ logfmt = [
|
||||||
anyhow = { version = "1" }
|
anyhow = { version = "1" }
|
||||||
axum = { version = "0.6.7", default-features = false, features = ["headers", "json", "query", "tokio"] }
|
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-auth = { version= "0.4.0", default-features = false, features = ["auth-bearer"] }
|
||||||
axum-server = { version = "0.4.4", default-features = false }
|
axum-server = { version = "0.5.1", default-features = false }
|
||||||
chrono = { version = "0.4.22" }
|
chrono = { version = "0.4.22", default-features = false }
|
||||||
fastrand = { version = "1.9.0" }
|
fastrand = { version = "2.0.0" }
|
||||||
flate2 = { version = "1" }
|
flate2 = { version = "1" }
|
||||||
hyper = { version = "0.14.17", default-features = false }
|
hyper = { version = "0.14.17", default-features = false }
|
||||||
lexopt = { version = "0.2.1" }
|
lexopt = { version = "0.2.1" }
|
||||||
lru = { version = "0.10.0" }
|
lru = { version = "0.11.0" }
|
||||||
nonempty = { version = "0.8.1", features = ["serialize"] }
|
nonempty = { version = "0.8.1", features = ["serialize"] }
|
||||||
radicle-surf = { version = "0.14.0", default-features = false, features = ["serde"] }
|
radicle-surf = { version = "0.14.0", default-features = false, features = ["serde"] }
|
||||||
serde = { version = "1", features = ["derive"] }
|
serde = { version = "1", features = ["derive"] }
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ struct AuthChallenge {
|
||||||
/// Create session.
|
/// Create session.
|
||||||
/// `POST /sessions`
|
/// `POST /sessions`
|
||||||
async fn session_create_handler(State(ctx): State<Context>) -> impl IntoResponse {
|
async fn session_create_handler(State(ctx): State<Context>) -> impl IntoResponse {
|
||||||
let rng = fastrand::Rng::new();
|
let mut rng = fastrand::Rng::new();
|
||||||
let session_id = repeat_with(|| rng.alphanumeric())
|
let session_id = repeat_with(|| rng.alphanumeric())
|
||||||
.take(32)
|
.take(32)
|
||||||
.collect::<String>();
|
.collect::<String>();
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,11 @@ amplify = { version = "4.0.0" }
|
||||||
anyhow = { version = "1" }
|
anyhow = { version = "1" }
|
||||||
bloomy = { version = "1.2" }
|
bloomy = { version = "1.2" }
|
||||||
byteorder = { version = "1" }
|
byteorder = { version = "1" }
|
||||||
chrono = { version = "0.4.0" }
|
chrono = { version = "0.4.0", default-features = false }
|
||||||
colored = { version = "1.9.0" }
|
colored = { version = "1.9.0" }
|
||||||
crossbeam-channel = { version = "0.5.6" }
|
crossbeam-channel = { version = "0.5.6" }
|
||||||
cyphernet = { version = "0.3.0", features = ["tor", "dns", "ed25519", "p2p-ed25519"] }
|
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"] }
|
io-reactor = { version = "0.2.1", features = ["popol"] }
|
||||||
lexopt = { version = "0.2.1" }
|
lexopt = { version = "0.2.1" }
|
||||||
libc = { version = "0.2.137" }
|
libc = { version = "0.2.137" }
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
#![allow(clippy::type_complexity)]
|
#![allow(clippy::type_complexity)]
|
||||||
|
|
||||||
|
use std::cell::RefCell;
|
||||||
use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque};
|
use std::collections::{BTreeMap, BTreeSet, HashSet, VecDeque};
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::ops::{Deref, DerefMut, Range};
|
use std::ops::{Deref, DerefMut, Range};
|
||||||
|
|
@ -195,7 +196,7 @@ pub struct Simulation<S, G> {
|
||||||
/// Current simulation time. Updated when a scheduled message is processed.
|
/// Current simulation time. Updated when a scheduled message is processed.
|
||||||
time: LocalTime,
|
time: LocalTime,
|
||||||
/// RNG.
|
/// RNG.
|
||||||
rng: fastrand::Rng,
|
rng: RefCell<fastrand::Rng>,
|
||||||
/// Storage type.
|
/// Storage type.
|
||||||
storage: PhantomData<S>,
|
storage: PhantomData<S>,
|
||||||
/// Signer type.
|
/// Signer type.
|
||||||
|
|
@ -218,7 +219,7 @@ impl<S: WriteStorage + 'static, G: Signer> Simulation<S, G> {
|
||||||
opts,
|
opts,
|
||||||
start_time: time,
|
start_time: time,
|
||||||
time,
|
time,
|
||||||
rng,
|
rng: RefCell::new(rng),
|
||||||
storage: PhantomData,
|
storage: PhantomData,
|
||||||
signer: PhantomData,
|
signer: PhantomData,
|
||||||
}
|
}
|
||||||
|
|
@ -255,6 +256,8 @@ impl<S: WriteStorage + 'static, G: Signer> Simulation<S, G> {
|
||||||
.get(&(from, to))
|
.get(&(from, to))
|
||||||
.cloned()
|
.cloned()
|
||||||
.map(|l| {
|
.map(|l| {
|
||||||
|
let mut rng = self.rng.borrow_mut();
|
||||||
|
|
||||||
if l <= MIN_LATENCY {
|
if l <= MIN_LATENCY {
|
||||||
l
|
l
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -262,12 +265,12 @@ impl<S: WriteStorage + 'static, G: Signer> Simulation<S, G> {
|
||||||
// will be between half, and two times the base latency.
|
// will be between half, and two times the base latency.
|
||||||
let millis = l.as_millis();
|
let millis = l.as_millis();
|
||||||
|
|
||||||
if self.rng.bool() {
|
if rng.bool() {
|
||||||
// More latency.
|
// More latency.
|
||||||
LocalDuration::from_millis(millis + self.rng.u128(0..millis))
|
LocalDuration::from_millis(millis + rng.u128(0..millis))
|
||||||
} else {
|
} else {
|
||||||
// Less latency.
|
// 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<S: WriteStorage + 'static, G: Signer> Simulation<S, G> {
|
||||||
let range = self.opts.latency.clone();
|
let range = self.opts.latency.clone();
|
||||||
let latency = LocalDuration::from_millis(
|
let latency = LocalDuration::from_millis(
|
||||||
self.rng
|
self.rng
|
||||||
|
.borrow_mut()
|
||||||
.u128(range.start as u128 * 1_000..range.end as u128 * 1_000),
|
.u128(range.start as u128 * 1_000..range.end as u128 * 1_000),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -515,7 +519,7 @@ impl<S: WriteStorage + 'static, G: Signer> Simulation<S, G> {
|
||||||
log::info!(target: "sim", "{} -/-> {} (partitioned)", node, remote);
|
log::info!(target: "sim", "{} -/-> {} (partitioned)", node, remote);
|
||||||
|
|
||||||
// Sometimes, the service gets a failure input, other times it just hangs.
|
// 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.inbox.insert(
|
||||||
self.time + MIN_LATENCY,
|
self.time + MIN_LATENCY,
|
||||||
Scheduled {
|
Scheduled {
|
||||||
|
|
@ -668,7 +672,7 @@ impl<S: WriteStorage + 'static, G: Signer> Simulation<S, G> {
|
||||||
|
|
||||||
/// Check whether we should fail the next operation.
|
/// Check whether we should fail the next operation.
|
||||||
fn is_fallible(&self) -> bool {
|
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.
|
/// Check whether two nodes are partitioned.
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = { version = "1" }
|
anyhow = { version = "1" }
|
||||||
anstyle-query = { version = "1.0.0" }
|
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" }
|
libc = { version = "0.2" }
|
||||||
once_cell = { version = "1.13" }
|
once_cell = { version = "1.13" }
|
||||||
termion = { version = "2" }
|
termion = { version = "2" }
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ test = ["qcheck", "radicle-crypto/test"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
amplify = { version = "4.0.0", default-features = false, features = ["std"] }
|
amplify = { version = "4.0.0", default-features = false, features = ["std"] }
|
||||||
crossbeam-channel = { version = "0.5.6" }
|
crossbeam-channel = { version = "0.5.6" }
|
||||||
cyphernet = { version = "0.2.0", features = ["tor", "dns", "p2p-ed25519"] }
|
cyphernet = { version = "0.3.0", features = ["tor", "dns", "p2p-ed25519"] }
|
||||||
fastrand = { version = "1.9.0" }
|
fastrand = { version = "2.0.0" }
|
||||||
multibase = { version = "0.9.1" }
|
multibase = { version = "0.9.1" }
|
||||||
localtime = { version = "1.2.0", features = ["serde"] }
|
localtime = { version = "1.2.0", features = ["serde"] }
|
||||||
log = { version = "0.4.17", features = ["std"] }
|
log = { version = "0.4.17", features = ["std"] }
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ impl Default for RandomState {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RandomState {
|
impl RandomState {
|
||||||
fn new(rng: fastrand::Rng) -> Self {
|
fn new(mut rng: fastrand::Rng) -> Self {
|
||||||
Self {
|
Self {
|
||||||
key1: rng.u64(..),
|
key1: rng.u64(..),
|
||||||
key2: rng.u64(..),
|
key2: rng.u64(..),
|
||||||
|
|
|
||||||
|
|
@ -580,7 +580,7 @@ mod test {
|
||||||
#[test]
|
#[test]
|
||||||
fn test_entries() {
|
fn test_entries() {
|
||||||
let ids = arbitrary::vec::<NodeId>(16);
|
let ids = arbitrary::vec::<NodeId>(16);
|
||||||
let rng = fastrand::Rng::new();
|
let mut rng = fastrand::Rng::new();
|
||||||
let mut cache = Book::memory().unwrap();
|
let mut cache = Book::memory().unwrap();
|
||||||
let mut expected = Vec::new();
|
let mut expected = Vec::new();
|
||||||
let timestamp = LocalTime::now().as_millis();
|
let timestamp = LocalTime::now().as_millis();
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
use std::cell::RefCell;
|
||||||
use std::hash;
|
use std::hash;
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
|
|
||||||
|
|
@ -15,7 +16,7 @@ use crate::prelude::Timestamp;
|
||||||
pub struct AddressBook<K: hash::Hash + Eq, V> {
|
pub struct AddressBook<K: hash::Hash + Eq, V> {
|
||||||
inner: RandomMap<K, V>,
|
inner: RandomMap<K, V>,
|
||||||
#[serde(skip)]
|
#[serde(skip)]
|
||||||
rng: fastrand::Rng,
|
rng: RefCell<fastrand::Rng>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<K: hash::Hash + Eq, V> AddressBook<K, V> {
|
impl<K: hash::Hash + Eq, V> AddressBook<K, V> {
|
||||||
|
|
@ -23,7 +24,7 @@ impl<K: hash::Hash + Eq, V> AddressBook<K, V> {
|
||||||
pub fn new(rng: fastrand::Rng) -> Self {
|
pub fn new(rng: fastrand::Rng) -> Self {
|
||||||
Self {
|
Self {
|
||||||
inner: RandomMap::with_hasher(rng.clone().into()),
|
inner: RandomMap::with_hasher(rng.clone().into()),
|
||||||
rng,
|
rng: RefCell::new(rng),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -40,7 +41,7 @@ impl<K: hash::Hash + Eq, V> AddressBook<K, V> {
|
||||||
.filter(|(k, v)| predicate(*k, *v))
|
.filter(|(k, v)| predicate(*k, *v))
|
||||||
.collect(),
|
.collect(),
|
||||||
) {
|
) {
|
||||||
let ix = self.rng.usize(..pairs.len());
|
let ix = self.rng.borrow_mut().usize(..pairs.len());
|
||||||
let pair = pairs[ix]; // Can't fail.
|
let pair = pairs[ix]; // Can't fail.
|
||||||
|
|
||||||
Some(pair)
|
Some(pair)
|
||||||
|
|
@ -53,7 +54,7 @@ impl<K: hash::Hash + Eq, V> AddressBook<K, V> {
|
||||||
pub fn with(self, rng: fastrand::Rng) -> Self {
|
pub fn with(self, rng: fastrand::Rng) -> Self {
|
||||||
Self {
|
Self {
|
||||||
inner: self.inner,
|
inner: self.inner,
|
||||||
rng,
|
rng: RefCell::new(rng),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +64,7 @@ impl<K: hash::Hash + Eq + Ord, V> AddressBook<K, V> {
|
||||||
pub fn shuffled(&self) -> std::vec::IntoIter<(&K, &V)> {
|
pub fn shuffled(&self) -> std::vec::IntoIter<(&K, &V)> {
|
||||||
let mut items = self.inner.iter().collect::<Vec<_>>();
|
let mut items = self.inner.iter().collect::<Vec<_>>();
|
||||||
items.sort_by_key(|(k, _)| *k);
|
items.sort_by_key(|(k, _)| *k);
|
||||||
self.rng.shuffle(&mut items);
|
self.rng.borrow_mut().shuffle(&mut items);
|
||||||
|
|
||||||
items.into_iter()
|
items.into_iter()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -454,7 +454,7 @@ mod test {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_prune() {
|
fn test_prune() {
|
||||||
let rng = fastrand::Rng::new();
|
let mut rng = fastrand::Rng::new();
|
||||||
let now = LocalTime::now();
|
let now = LocalTime::now();
|
||||||
let ids = arbitrary::vec::<Id>(10);
|
let ids = arbitrary::vec::<Id>(10);
|
||||||
let nodes = arbitrary::vec::<NodeId>(10);
|
let nodes = arbitrary::vec::<NodeId>(10);
|
||||||
|
|
|
||||||
|
|
@ -97,15 +97,16 @@ impl Arbitrary for Did {
|
||||||
|
|
||||||
impl Arbitrary for Project {
|
impl Arbitrary for Project {
|
||||||
fn arbitrary(g: &mut qcheck::Gen) -> Self {
|
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())
|
let name = iter::repeat_with(|| rng.alphanumeric())
|
||||||
.take(rng.usize(1..16))
|
.take(length)
|
||||||
.collect();
|
.collect();
|
||||||
let description = iter::repeat_with(|| rng.alphanumeric())
|
let description = iter::repeat_with(|| rng.alphanumeric())
|
||||||
.take(rng.usize(0..32))
|
.take(length * 2)
|
||||||
.collect();
|
.collect();
|
||||||
let default_branch: git::RefString = iter::repeat_with(|| rng.alphanumeric())
|
let default_branch: git::RefString = iter::repeat_with(|| rng.alphanumeric())
|
||||||
.take(rng.usize(1..16))
|
.take(length)
|
||||||
.collect::<String>()
|
.collect::<String>()
|
||||||
.try_into()
|
.try_into()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
@ -125,7 +126,7 @@ impl Arbitrary for Doc<Unverified> {
|
||||||
|
|
||||||
impl Arbitrary for Doc<Verified> {
|
impl Arbitrary for Doc<Verified> {
|
||||||
fn arbitrary(g: &mut qcheck::Gen) -> Self {
|
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 project = Project::arbitrary(g);
|
||||||
let delegates: NonEmpty<_> = iter::repeat_with(|| Did::arbitrary(g))
|
let delegates: NonEmpty<_> = iter::repeat_with(|| Did::arbitrary(g))
|
||||||
.take(rng.usize(1..6))
|
.take(rng.usize(1..6))
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ pub fn populate(repo: &git2::Repository, scale: usize) -> Vec<git::Qualified> {
|
||||||
return vec![];
|
return vec![];
|
||||||
}
|
}
|
||||||
let head = repo.head().unwrap().peel_to_commit().unwrap();
|
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 buffer = vec![0; 1024 * 1024 * scale];
|
||||||
let mut refs = Vec::new();
|
let mut refs = Vec::new();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue