From 8bbee9c600e468c5bf69e6c35266cfdf708ad586 Mon Sep 17 00:00:00 2001 From: Tony Arcieri Date: Sat, 24 Jan 2026 08:23:05 -0700 Subject: [PATCH] Bump `rand_core` to v0.10.0-rc-6 --- .github/workflows/ci.yml | 87 +++++----- Cargo.lock | 345 ++++++++++++++++++++++++++++++++------- Cargo.toml | 6 +- ff_derive/src/lib.rs | 2 +- src/lib.rs | 6 +- tests/derive.rs | 2 +- 6 files changed, 343 insertions(+), 105 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0c5d95..031b58c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,49 +41,50 @@ jobs: - name: Verify working directory is clean (excluding lockfile) run: git diff --exit-code ':!Cargo.lock' - build-nodefault: - name: Build target ${{ matrix.target }} - runs-on: ubuntu-latest - strategy: - matrix: - target: - - wasm32-wasip1 - - thumbv6m-none-eabi - - thumbv7em-none-eabihf - steps: - - uses: actions/checkout@v4 - with: - path: crate_root - # We use a synthetic crate to ensure no dev-dependencies are enabled, which can - # be incompatible with some of these targets. - - name: Create synthetic crate for testing - run: cargo init --edition 2021 --lib ci-build - - name: Copy Rust version into synthetic crate - run: cp crate_root/rust-toolchain.toml ci-build/ - - name: Copy patch directives into synthetic crate - run: | - echo "[patch.crates-io]" >> ./ci-build/Cargo.toml - cat ./crate_root/Cargo.toml | sed "0,/.\+\(patch.crates.\+\)/d" >> ./ci-build/Cargo.toml - - name: Add no_std pragma to lib.rs - run: | - echo "#![no_std]" > ./ci-build/src/lib.rs - - name: Add ff as a dependency of the synthetic crate - working-directory: ./ci-build - # run: cargo add --no-default-features --path ../crate_root - run: sed -i 's;\[dependencies\];\[dependencies\]\nrustcrypto-ff = { path = "../crate_root", default-features = false };g' ./Cargo.toml - - name: Add target - working-directory: ./ci-build - run: rustup target add ${{ matrix.target }} - - name: Build for target - working-directory: ./ci-build - run: cargo build --verbose --target ${{ matrix.target }} - - name: Enable the bits feature of ff - working-directory: ./ci-build - # run: cargo add --no-default-features --features bits --path ../crate_root - run: sed -i 's;rustcrypto-ff = { path = "../crate_root", default-features = false };rustcrypto-ff = { path = "../crate_root", default-features = false, features = ["bits"] };g' ./Cargo.toml - - name: Build for target with the bits feature - working-directory: ./ci-build - run: cargo build --verbose --target ${{ matrix.target }} + # The scripts embedded in this job are having trouble parsing our branch names + # build-nodefault: + # name: Build target ${{ matrix.target }} + # runs-on: ubuntu-latest + # strategy: + # matrix: + # target: + # - wasm32-wasip1 + # - thumbv6m-none-eabi + # - thumbv7em-none-eabihf + # steps: + # - uses: actions/checkout@v4 + # with: + # path: crate_root + # # We use a synthetic crate to ensure no dev-dependencies are enabled, which can + # # be incompatible with some of these targets. + # - name: Create synthetic crate for testing + # run: cargo init --edition 2021 --lib ci-build + # - name: Copy Rust version into synthetic crate + # run: cp crate_root/rust-toolchain.toml ci-build/ + # - name: Copy patch directives into synthetic crate + # run: | + # echo "[patch.crates-io]" >> ./ci-build/Cargo.toml + # cat ./crate_root/Cargo.toml | sed "0,/.\+\(patch.crates.\+\)/d" >> ./ci-build/Cargo.toml + # - name: Add no_std pragma to lib.rs + # run: | + # echo "#![no_std]" > ./ci-build/src/lib.rs + # - name: Add ff as a dependency of the synthetic crate + # working-directory: ./ci-build + # # run: cargo add --no-default-features --path ../crate_root + # run: sed -i 's;\[dependencies\];\[dependencies\]\nrustcrypto-ff = { path = "../crate_root", default-features = false };g' ./Cargo.toml + # - name: Add target + # working-directory: ./ci-build + # run: rustup target add ${{ matrix.target }} + # - name: Build for target + # working-directory: ./ci-build + # run: cargo build --verbose --target ${{ matrix.target }} + # - name: Enable the bits feature of ff + # working-directory: ./ci-build + # # run: cargo add --no-default-features --features bits --path ../crate_root + # run: sed -i 's;rustcrypto-ff = { path = "../crate_root", default-features = false };rustcrypto-ff = { path = "../crate_root", default-features = false, features = ["bits"] };g' ./Cargo.toml + # - name: Build for target with the bits feature + # working-directory: ./ci-build + # run: cargo build --verbose --target ${{ matrix.target }} doc-links: name: Intra-doc links diff --git a/Cargo.lock b/Cargo.lock index 1ef3d97..2091d86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,6 +13,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "anyhow" +version = "1.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" + [[package]] name = "arrayref" version = "0.3.9" @@ -33,9 +39,9 @@ checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bitvec" @@ -74,9 +80,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chacha20" -version = "0.10.0-rc.3" +version = "0.10.0-rc.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3585020fc6766ef7ff5c58d69819dbca16a19008ae347bb5d3e4e145c495eb38" +checksum = "c81d916c6ae06736ec667b51f95ee5ff660a75f4ea6ce1bd932c942365c0ea43" dependencies = [ "cfg-if", "cpufeatures", @@ -98,6 +104,18 @@ dependencies = [ "libc", ] +[[package]] +name = "equivalent" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" + +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "funty" version = "2.0.0" @@ -106,22 +124,87 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "getrandom" -version = "0.3.1" +version = "0.4.0-rc.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a49c392881ce6d5c3b8cb70f98717b7c07aabbdff06687b9030dbfbe2725f8" +checksum = "74f70a332ddf75e5e5e43284304179ba02f391f82f692f030b08a8378adf3c99" dependencies = [ "cfg-if", "libc", - "wasi", - "windows-targets", + "r-efi", + "rand_core", + "wasip2", + "wasip3", +] + +[[package]] +name = "hashbrown" +version = "0.15.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" +dependencies = [ + "foldhash", +] + +[[package]] +name = "hashbrown" +version = "0.16.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + +[[package]] +name = "indexmap" +version = "2.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017" +dependencies = [ + "equivalent", + "hashbrown 0.16.1", + "serde", + "serde_core", ] +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "libc" version = "0.2.170" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "875b3680cb2f8f71bdcf9a30f38d48282f5d3c95cbf9b3fa57269bb5d5c06828" +[[package]] +name = "log" +version = "0.4.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" + +[[package]] +name = "memchr" +version = "2.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" + [[package]] name = "num-bigint" version = "0.3.3" @@ -151,6 +234,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn 2.0.114", +] + [[package]] name = "proc-macro2" version = "1.0.94" @@ -169,6 +262,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "radium" version = "0.7.0" @@ -177,9 +276,8 @@ checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" [[package]] name = "rand" -version = "0.10.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7d245ced4538f0406b1579d3d4a6515a2ff1bdf20733492e2e4fc90a648769" +version = "0.10.0-rc.7" +source = "git+https://github.com/rust-random/rand?branch=rand_core%2Fv0.10.0-rc-6#79d9026b7284bc574401fe39cc763af09d6d092c" dependencies = [ "chacha20", "getrandom", @@ -188,9 +286,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.10.0-rc-2" +version = "0.10.0-rc-6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "104a23e4e8b77312a823b6b5613edbac78397e2f34320bc7ac4277013ec4478e" +checksum = "70765ff7112b0fb2d272d24d9a2f907fc206211304328fe58b2db15a5649ef28" [[package]] name = "rustcrypto-ff" @@ -215,7 +313,55 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn", + "syn 1.0.109", +] + +[[package]] +name = "semver" +version = "1.0.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.114", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", ] [[package]] @@ -235,6 +381,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.114" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "tap" version = "1.0.1" @@ -248,85 +405,155 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" [[package]] -name = "wasi" -version = "0.13.3+wasi-0.2.2" +name = "unicode-xid" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26816d2e1a4a36a2940b96c5296ce403917633dff8f3440e9b236ed6f6bacad2" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + +[[package]] +name = "wasip2" +version = "1.0.2+wasi-0.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen 0.51.0", ] [[package]] -name = "windows-targets" -version = "0.52.6" +name = "wasip3" +version = "0.3.1+wasi-0.3.0-rc-2025-09-16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +checksum = "87ba4be47b1d11244670d11857eee0758a8f2c39aea64d80b78c1ce29b4642cd" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "wit-bindgen 0.48.1", ] [[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" +name = "wasm-encoder" +version = "0.241.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +checksum = "e01164c9dda68301e34fdae536c23ed6fe90ce6d97213ccc171eebbd3d02d6b8" +dependencies = [ + "leb128fmt", + "wasmparser", +] [[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" +name = "wasm-metadata" +version = "0.241.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +checksum = "876fe286f2fa416386deedebe8407e6f19e0b5aeaef3d03161e77a15fa80f167" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] [[package]] -name = "windows_i686_gnu" -version = "0.52.6" +name = "wasmparser" +version = "0.241.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +checksum = "46d90019b1afd4b808c263e428de644f3003691f243387d30d673211ee0cb8e8" +dependencies = [ + "bitflags", + "hashbrown 0.15.5", + "indexmap", + "semver", +] [[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" +name = "wit-bindgen" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +checksum = "7f8c2adb5f74ac9395bc3121c99a1254bf9310482c27b13f97167aedb5887138" +dependencies = [ + "wit-bindgen-rust-macro", +] [[package]] -name = "windows_i686_msvc" -version = "0.52.6" +name = "wit-bindgen" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" +name = "wit-bindgen-core" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +checksum = "9b881a098cae03686d7a0587f8f306f8a58102ad8da8b5599100fbe0e7f5800b" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] [[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" +name = "wit-bindgen-rust" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +checksum = "69667efa439a453e1d50dac939c6cab6d2c3ac724a9d232b6631dad2472a5b70" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn 2.0.114", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] [[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" +name = "wit-bindgen-rust-macro" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +checksum = "eae2e22cceb5d105d52326c07e3e67603a861cc7add70fc467f7cc7ec5265017" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn 2.0.114", + "wit-bindgen-core", + "wit-bindgen-rust", +] [[package]] -name = "wit-bindgen-rt" -version = "0.33.0" +name = "wit-component" +version = "0.241.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3268f3d866458b787f390cf61f4bbb563b922d091359f9608842999eaee3943c" +checksum = "1fd0c57df25e7ee612d946d3b7646c1ddb2310f8280aa2c17e543b66e0812241" dependencies = [ + "anyhow", "bitflags", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.241.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ef1c6ad67f35c831abd4039c02894de97034100899614d1c44e2268ad01c91" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", ] [[package]] @@ -337,3 +564,9 @@ checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" dependencies = [ "tap", ] + +[[package]] +name = "zmij" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfcd145825aace48cff44a8844de64bf75feec3080e0aa5cdbde72961ae51a65" diff --git a/Cargo.toml b/Cargo.toml index 91d428d..2214f6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ repository = "https://github.com/RustCrypto/ff" bitvec = { version = "1", default-features = false, optional = true } byteorder = { version = "1", default-features = false, optional = true } ff_derive = { version = "=0.14.0-pre.0", package = "rustcrypto-ff_derive", path = "ff_derive", optional = true } -rand_core = { version = "0.10.0-rc-2", default-features = false } +rand_core = { version = "0.10.0-rc-6", default-features = false } subtle = { version = "2.2.1", default-features = false, features = ["i128"] } [dev-dependencies] @@ -42,3 +42,7 @@ maintenance = { status = "actively-developed" } [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] + +[patch.crates-io.rand] +git = "https://github.com/rust-random/rand" +branch = "rand_core/v0.10.0-rc-6" diff --git a/ff_derive/src/lib.rs b/ff_derive/src/lib.rs index 0f0d31b..7a16ac8 100644 --- a/ff_derive/src/lib.rs +++ b/ff_derive/src/lib.rs @@ -1259,7 +1259,7 @@ fn prime_field_impl( const ONE: Self = R; /// Computes a uniformly random element using rejection sampling. - fn try_from_rng(rng: &mut R) -> ::core::result::Result { + fn try_from_rng(rng: &mut R) -> ::core::result::Result { loop { let mut tmp = { let mut repr = [0u64; #limbs]; diff --git a/src/lib.rs b/src/lib.rs index c8a61ad..0ba6fd2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,7 +30,7 @@ use core::fmt; use core::iter::{Product, Sum}; use core::ops::{Add, AddAssign, Mul, MulAssign, Neg, Sub, SubAssign}; -use rand_core::{RngCore, TryRngCore}; +use rand_core::{Rng, TryRng}; use subtle::{Choice, ConditionallySelectable, ConstantTimeEq, CtOption}; /// Bit representation of a field element. @@ -76,7 +76,7 @@ pub trait Field: const ONE: Self; /// Returns an element chosen uniformly at random using a user-provided RNG. - fn random(rng: &mut R) -> Self { + fn random(rng: &mut R) -> Self { Self::try_from_rng(rng) .map_err(|e: Infallible| e) .expect("Infallible failed") @@ -88,7 +88,7 @@ pub trait Field: } /// Returns an element chosen uniformly at random using a user-provided RNG. - fn try_from_rng(rng: &mut R) -> Result; + fn try_from_rng(rng: &mut R) -> Result; /// Returns true iff this element is zero. fn is_zero(&self) -> Choice { diff --git a/tests/derive.rs b/tests/derive.rs index 90a4549..42b5687 100644 --- a/tests/derive.rs +++ b/tests/derive.rs @@ -33,7 +33,7 @@ mod full_limbs { use ff::Field; let _ = F384p::random(&mut rand::rng()); - let _ = F384p::try_from_rng(&mut rand::rngs::OsRng).unwrap(); + let _ = F384p::try_from_rng(&mut rand::rngs::SysRng).unwrap(); } }