Skip to content

Commit

Permalink
chore: Update Rust toolchain (#388)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
huitseeker authored Jul 1, 2024
1 parent 3043e8c commit 3ff41ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -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" ]

1 change: 1 addition & 0 deletions src/gadgets/nonnative/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use std::io::{self, Write};
pub struct Bit<Scalar: PrimeField> {
/// The linear combination which constrain the value of the bit
pub bit: LinearCombination<Scalar>,
#[allow(unused)]
/// The value of the bit (filled at witness-time)
pub value: Option<bool>,
}
Expand Down
3 changes: 1 addition & 2 deletions src/gadgets/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ pub fn alloc_scalar_as_base<E, CS>(
input: Option<E::Scalar>,
) -> Result<AllocatedNum<E::Base>, SynthesisError>
where
E: Engine,
<E as Engine>::Scalar: PrimeFieldBits,
E: Engine<Scalar: PrimeFieldBits>,
CS: ConstraintSystem<<E as Engine>::Base>,
{
AllocatedNum::alloc(cs.namespace(|| "allocate scalar as base"), || {
Expand Down

0 comments on commit 3ff41ac

Please sign in to comment.