From 3ff41acaaddf82abe00926ae353c26ad84d726c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Garillot?= <4142+huitseeker@users.noreply.github.com> Date: Mon, 1 Jul 2024 10:42:12 +0900 Subject: [PATCH] chore: Update Rust toolchain (#388) * chore: Update Rust toolchain - Updated Rust toolchain from version `1.78` to `1.79`, - Added an unused attribute to address potential compilation errors related to unused variables in the `Bit` struct in `nonnative/util.rs`. - Refactored type constraints for increased readability in `alloc_scalar_as_base` function within `utils.rs`. * chore: bump msrv --- Cargo.toml | 2 +- rust-toolchain.toml | 2 +- src/gadgets/nonnative/util.rs | 1 + src/gadgets/utils.rs | 3 +-- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 878c9cd0a..1c6718c9f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ readme = "README.md" repository = "https://github.com/lurk-lab/arecibo" license-file = "LICENSE" keywords = ["zkSNARKs", "cryptography", "proofs"] -rust-version="1.74.1" +rust-version="1.79" [dependencies] bellpepper-core = { version = "0.4.0", default-features = false } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index e4205e80b..5d7f87026 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,6 +1,6 @@ [toolchain] # The default profile includes rustc, rust-std, cargo, rust-docs, rustfmt and clippy. profile = "default" -channel = "1.78" +channel = "1.79" targets = [ "wasm32-unknown-unknown" ] diff --git a/src/gadgets/nonnative/util.rs b/src/gadgets/nonnative/util.rs index c63108f07..e29288ff5 100644 --- a/src/gadgets/nonnative/util.rs +++ b/src/gadgets/nonnative/util.rs @@ -14,6 +14,7 @@ use std::io::{self, Write}; pub struct Bit { /// The linear combination which constrain the value of the bit pub bit: LinearCombination, + #[allow(unused)] /// The value of the bit (filled at witness-time) pub value: Option, } diff --git a/src/gadgets/utils.rs b/src/gadgets/utils.rs index fcae1350e..84cdbf443 100644 --- a/src/gadgets/utils.rs +++ b/src/gadgets/utils.rs @@ -74,8 +74,7 @@ pub fn alloc_scalar_as_base( input: Option, ) -> Result, SynthesisError> where - E: Engine, - ::Scalar: PrimeFieldBits, + E: Engine, CS: ConstraintSystem<::Base>, { AllocatedNum::alloc(cs.namespace(|| "allocate scalar as base"), || {