Skip to content

Commit 57b6be9

Browse files
committed
chore: nit
1 parent c333ef7 commit 57b6be9

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

crates/brainfuck_prover/src/components/processor/table.rs

+6-17
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@ pub struct ProcessorTableRow {
3434
mvi: BaseField,
3535
}
3636

37-
impl ProcessorTableRow {
38-
/// Creates a row for the [`ProcessorTable`] which is considered 'dummy'.
39-
///
40-
/// A 'dummy' row, is a row that is not part of the execution trace from the Brainfuck program
41-
/// execution.
42-
/// They are used for padding and filling the gaps after sorting by `clk`, to enforce the
43-
/// correct sorting.
44-
pub fn new_dummy(clk: BaseField, ip: BaseField) -> Self {
45-
Self { clk, ip, ..Default::default() }
46-
}
47-
}
48-
4937
impl From<&Registers> for ProcessorTableRow {
5038
fn from(registers: &Registers) -> Self {
5139
Self {
@@ -111,10 +99,11 @@ impl ProcessorTable {
11199
let trace_len = self.table.len();
112100
let padding_offset = (trace_len.next_power_of_two() - trace_len) as u32;
113101
for i in 1..=padding_offset {
114-
self.add_row(ProcessorTableRow::new_dummy(
115-
last_row.clk + BaseField::from(i),
116-
last_row.ip,
117-
));
102+
self.add_row(ProcessorTableRow {
103+
clk: last_row.clk + BaseField::from(i),
104+
ip: last_row.ip,
105+
..Default::default()
106+
});
118107
}
119108
}
120109
}
@@ -124,7 +113,7 @@ impl From<Vec<Registers>> for ProcessorTable {
124113
fn from(registers: Vec<Registers>) -> Self {
125114
let mut processor_table = Self::new();
126115

127-
let rows = registers.iter().map(|x| x.into()).collect();
116+
let rows = registers.iter().map(Into::into).collect();
128117
processor_table.add_rows(rows);
129118
processor_table.pad();
130119

crates/brainfuck_vm/src/bin/brainfuck_vm.rs

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ struct Args {
2121
#[clap(long)]
2222
trace: bool,
2323
#[clap(long)]
24-
pad_trace: bool,
25-
#[clap(long)]
2624
ram_size: Option<usize>,
2725
}
2826

0 commit comments

Comments
 (0)