Skip to content

Commit

Permalink
chore: use num_trait one
Browse files Browse the repository at this point in the history
  • Loading branch information
zmalatrax committed Dec 16, 2024
1 parent 1d86c43 commit f4453ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions crates/brainfuck_prover/src/components/instruction/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -668,7 +668,7 @@ mod tests {
fn test_trace_evaluation_single_row() {
let mut instruction_intermediate_table = InstructionIntermediateTable::new();
instruction_intermediate_table.add_entry(InstructionTableEntry {
ip: BaseField::from(1),
ip: BaseField::one(),
ci: BaseField::from(43),
ni: BaseField::from(91),
});
Expand All @@ -685,7 +685,7 @@ mod tests {
);

// Expected values for the single row
let expected_ip_column = vec![BaseField::from(1); 1 << LOG_N_LANES];
let expected_ip_column = vec![BaseField::one(); 1 << LOG_N_LANES];
let expected_ci_column = vec![BaseField::from(43); 1 << LOG_N_LANES];
let expected_ni_column = vec![BaseField::from(91); 1 << LOG_N_LANES];

Expand Down Expand Up @@ -783,7 +783,7 @@ mod tests {
ni: BaseField::from(91),
},
InstructionTableEntry {
ip: BaseField::from(1),
ip: BaseField::one(),
ci: BaseField::from(91),
ni: BaseField::from(9),
},
Expand Down
2 changes: 1 addition & 1 deletion crates/brainfuck_prover/src/components/io/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ mod tests {

// Add rows to the I/O table.
let rows = vec![
IOTableRow::new(BaseField::zero(), BaseField::from(44), BaseField::from(1)),
IOTableRow::new(BaseField::zero(), BaseField::from(44), BaseField::one()),
IOTableRow::new(BaseField::one(), BaseField::from(44), BaseField::from(2)),
];
io_table.add_rows(rows);
Expand Down
10 changes: 5 additions & 5 deletions crates/brainfuck_prover/src/components/processor/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ mod tests {

let entries = vec![
ProcessorTableEntry {
clk: BaseField::from(1),
clk: BaseField::one(),
ip: BaseField::from(5),
ci: BaseField::from(43),
ni: BaseField::from(91),
Expand Down Expand Up @@ -792,15 +792,15 @@ mod tests {
let entries = vec![
ProcessorTableEntry {
clk: BaseField::from(0),
ip: BaseField::from(1),
ip: BaseField::one(),
ci: BaseField::from(2),
ni: BaseField::from(3),
mp: BaseField::from(4),
mv: BaseField::from(5),
mvi: BaseField::from(6),
},
ProcessorTableEntry {
clk: BaseField::from(1),
clk: BaseField::one(),
ip: BaseField::from(2),
ci: BaseField::from(3),
ni: BaseField::from(4),
Expand Down Expand Up @@ -832,9 +832,9 @@ mod tests {
let mut mvi_column = BaseColumn::zeros(expected_size);

clk_column.data[0] = BaseField::from(0).into();
clk_column.data[1] = BaseField::from(1).into();
clk_column.data[1] = BaseField::one().into();

ip_column.data[0] = BaseField::from(1).into();
ip_column.data[0] = BaseField::one().into();
ip_column.data[1] = BaseField::from(2).into();

ci_column.data[0] = BaseField::from(2).into();
Expand Down

0 comments on commit f4453ed

Please sign in to comment.