update versions of multiple dependencies.#65
Open
carloskiki wants to merge 4 commits intofilecoin-project:masterfrom
Open
update versions of multiple dependencies.#65carloskiki wants to merge 4 commits intofilecoin-project:masterfrom
carloskiki wants to merge 4 commits intofilecoin-project:masterfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates from the deprecated random() method to the new try_from_rng() method across all Field and Group implementations, aligning with updates to the ff and group traits. The change updates to pre-release versions of dependencies (ff 0.14.0-pre.0, group 0.14.0-pre.0, pairing 0.24.0-pre.0, and rand_core 0.9) and removes the rust-toolchain file to allow more flexibility in Rust version selection.
Key changes:
- Replaced
Field::random(impl RngCore)withField::try_from_rng(&mut R: TryRngCore + ?Sized)across scalar and field point implementations - Replaced
Group::random(impl RngCore)withGroup::try_from_rng(&mut R: TryRngCore + ?Sized)for group elements (G1, G2, Gt) - Updated dependencies to pre-release versions with breaking trait changes
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/scalar.rs | Replaced Field::random with Field::try_from_rng for Scalar, using try_next_u64 instead of next_u64 |
| src/gt.rs | Replaced Group::random with Group::try_from_rng for Gt and removed unused RngCore import |
| src/g2.rs | Replaced Group::random with Group::try_from_rng for G2Projective, reordered methods, changed to try_fill_bytes |
| src/g1.rs | Replaced Group::random with Group::try_from_rng for G1Projective, changed to try_fill_bytes |
| src/fp6.rs | Replaced Field::random with Field::try_from_rng for Fp6, propagating try_from_rng calls |
| src/fp2.rs | Replaced Field::random with Field::try_from_rng for Fp2, propagating try_from_rng calls |
| src/fp12.rs | Replaced Field::random with Field::try_from_rng for Fp12, propagating try_from_rng calls |
| src/fp.rs | Replaced Field::random with Field::try_from_rng for Fp, using try_next_u64 instead of next_u64 |
| rust-toolchain | Removed file, allowing flexible Rust version selection |
| Cargo.toml | Updated version to 0.8.0-pre.0 and upgraded dependencies to pre-release versions |
Comments suppressed due to low confidence (7)
src/fp.rs:11
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
src/fp2.rs:11
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
src/fp6.rs:16
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
src/fp12.rs:11
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
src/scalar.rs:16
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
src/g1.rs:16
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
src/g2.rs:15
- The
RngCoreimport is no longer used in this file since the implementation now only usesrand_core::TryRngCore. This unused import should be removed to maintain code cleanliness.
use rand_core::RngCore;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates versions of many dependencies, and also updates the crate version.