Skip to content

Commit

Permalink
address clippy, switch to stable
Browse files Browse the repository at this point in the history
  • Loading branch information
srinathsetty committed Apr 11, 2024
1 parent 7d8546c commit e35473a
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ on:
branches: [ master ]

jobs:
build_nightly:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install
run: rustup default nightly
run: rustup default stable
- name: Install rustfmt Components
run: rustup component add rustfmt
- name: Install clippy
Expand All @@ -28,13 +28,13 @@ jobs:
- name: Check clippy warnings
run: cargo clippy --all-targets --all-features -- -D warnings

build_nightly_wasm:
build_wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install
run: rustup default nightly
run: rustup default stable

- name: Build without std
run: cargo build --no-default-features --verbose
Expand Down Expand Up @@ -63,4 +63,3 @@ jobs:
- name: Build for target wasm32-unknown-unknown
run: RUSTFLAGS="" cargo build --target=wasm32-unknown-unknown --no-default-features --verbose

2 changes: 1 addition & 1 deletion profiler/nizk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fn print(msg: &str) {

pub fn main() {
// the list of number of variables (and constraints) in an R1CS instance
let inst_sizes = vec![10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
let inst_sizes = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];

println!("Profiler:: NIZK");
for &s in inst_sizes.iter() {
Expand Down
2 changes: 1 addition & 1 deletion profiler/snark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn print(msg: &str) {

pub fn main() {
// the list of number of variables (and constraints) in an R1CS instance
let inst_sizes = vec![10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
let inst_sizes = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];

println!("Profiler:: SNARK");
for &s in inst_sizes.iter() {
Expand Down
4 changes: 2 additions & 2 deletions src/product_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ impl ProductCircuitEvalProof {

impl ProductCircuitEvalProofBatched {
pub fn prove(
prod_circuit_vec: &mut Vec<&mut ProductCircuit>,
dotp_circuit_vec: &mut Vec<&mut DotProductCircuit>,
prod_circuit_vec: &mut [&mut ProductCircuit],
dotp_circuit_vec: &mut [&mut DotProductCircuit],
transcript: &mut Transcript,
) -> (Self, Vec<Scalar>) {
assert!(!prod_circuit_vec.is_empty());
Expand Down
6 changes: 3 additions & 3 deletions src/sparse_mlpoly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ impl ProductLayerProof {
};

let (proof_ops, rand_ops) = ProductCircuitEvalProofBatched::prove(
&mut vec![
&mut [
&mut row_read_A[0],
&mut row_read_B[0],
&mut row_read_C[0],
Expand All @@ -1168,7 +1168,7 @@ impl ProductLayerProof {
&mut col_write_B[0],
&mut col_write_C[0],
],
&mut vec![
&mut [
&mut dotp_left_A[0],
&mut dotp_right_A[0],
&mut dotp_left_B[0],
Expand All @@ -1181,7 +1181,7 @@ impl ProductLayerProof {

// produce a batched proof of memory-related product circuits
let (proof_mem, rand_mem) = ProductCircuitEvalProofBatched::prove(
&mut vec![
&mut [
&mut row_prod_layer.init,
&mut row_prod_layer.audit,
&mut col_prod_layer.init,
Expand Down

0 comments on commit e35473a

Please sign in to comment.