Skip to content

Commit

Permalink
Fix warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
thealmarty authored and morganthomas committed Apr 8, 2024
1 parent ad8faea commit 28b8c5f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
4 changes: 1 addition & 3 deletions basic/src/bin/test_prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@ extern crate core;

use p3_baby_bear::BabyBear;
use p3_fri::{TwoAdicFriPcs, TwoAdicFriPcsConfig};
use valida_alu_u32::add::{Add32Instruction, MachineWithAdd32Chip};
use valida_alu_u32::add::Add32Instruction;
use valida_basic::BasicMachine;
use valida_cpu::{
BeqInstruction, BneInstruction, Imm32Instruction, JalInstruction, JalvInstruction,
MachineWithCpuChip, StopInstruction,
};
use valida_machine::{
FixedAdviceProvider, Instruction, InstructionWord, Machine, MachineProof, Operands, ProgramROM,
Word,
};

use valida_memory::MachineWithMemoryChip;
use valida_opcodes::BYTES_PER_INSTR;
use valida_program::MachineWithProgramChip;

Expand Down
2 changes: 1 addition & 1 deletion basic/src/bin/valida.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use p3_baby_bear::BabyBear;

use p3_fri::{FriConfig, TwoAdicFriPcs, TwoAdicFriPcsConfig};
use valida_cpu::MachineWithCpuChip;
use valida_machine::{Machine, MachineProof, ProgramROM, StdinAdviceProvider};
use valida_machine::{Machine, MachineProof, StdinAdviceProvider};

use valida_elf::{load_executable_file, Program};
use valida_program::MachineWithProgramChip;
Expand Down
4 changes: 2 additions & 2 deletions derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use proc_macro::TokenStream;
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
use syn::parse::{Parse, ParseStream};
use syn::{spanned::Spanned, Data, Field, Fields, Ident, Type, TypePath};
use syn::{spanned::Spanned, Data, Field, Fields, Ident};

// TODO: now trivial with a single field
struct MachineFields {
Expand Down Expand Up @@ -162,7 +162,7 @@ fn run_method(
.collect::<TokenStream2>();

let init_static_data: TokenStream2 = match static_data_chip {
Some(static_data_chip) => quote! {
Some(_static_data_chip) => quote! {
self.initialize_memory();
},
None => quote! {},
Expand Down
5 changes: 1 addition & 4 deletions memory/src/stark.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
use crate::columns::{MemoryCols, NUM_MEM_COLS};
use crate::columns::NUM_MEM_COLS;
use crate::MemoryChip;
use core::borrow::Borrow;

use p3_air::{Air, AirBuilder, BaseAir};
use p3_field::AbstractField;
use p3_matrix::MatrixRowSlices;

impl<F> BaseAir<F> for MemoryChip {
fn width(&self) -> usize {
Expand Down
5 changes: 2 additions & 3 deletions program/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

extern crate alloc;

use crate::columns::{COL_MAP, NUM_PROGRAM_COLS, PREPROCESSED_COL_MAP};
use crate::columns::NUM_PROGRAM_COLS;
use alloc::vec;
use alloc::vec::Vec;
use valida_bus::MachineWithProgramBus;
use valida_machine::{Chip, Interaction, Machine, ProgramROM};
use valida_util::pad_to_power_of_two;

use p3_air::VirtualPairCol;
use p3_field::{AbstractField, Field};
use p3_matrix::dense::RowMajorMatrix;
use valida_machine::StarkConfig;
Expand Down Expand Up @@ -48,7 +47,7 @@ where
RowMajorMatrix::new(values, NUM_PROGRAM_COLS)
}

fn global_receives(&self, machine: &M) -> Vec<Interaction<SC::Val>> {
fn global_receives(&self, _machine: &M) -> Vec<Interaction<SC::Val>> {
// let pc = VirtualPairCol::single_preprocessed(PREPROCESSED_COL_MAP.pc);
// let opcode = VirtualPairCol::single_preprocessed(PREPROCESSED_COL_MAP.opcode);
// let mut fields = vec![pc, opcode];
Expand Down
6 changes: 3 additions & 3 deletions static_data/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ use p3_air::VirtualPairCol;
use p3_field::{AbstractField, Field};
use p3_matrix::dense::RowMajorMatrix;
use valida_bus::MachineWithMemBus;
use valida_machine::{BusArgument, Chip, Interaction, Machine, StarkConfig, Word};
use valida_memory::{MachineWithMemoryChip, MemoryChip};
use valida_machine::{Chip, Interaction, StarkConfig, Word};
use valida_memory::MachineWithMemoryChip;

pub mod columns;
pub mod stark;
Expand Down Expand Up @@ -57,7 +57,7 @@ where
M: MachineWithMemBus<SC::Val>,
SC: StarkConfig,
{
fn generate_trace(&self, machine: &M) -> RowMajorMatrix<SC::Val> {
fn generate_trace(&self, _machine: &M) -> RowMajorMatrix<SC::Val> {
let mut rows = self
.cells
.iter()
Expand Down

0 comments on commit 28b8c5f

Please sign in to comment.