mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-05-28 04:39:55 +00:00
Clippy
This commit is contained in:
parent
5a0c1ad8b7
commit
77f1cd3496
@ -289,7 +289,7 @@ fn simulate_cpu_between_labels_and_get_user_jumps<F: Field>(
|
|||||||
final_label: &str,
|
final_label: &str,
|
||||||
state: &mut GenerationState<F>,
|
state: &mut GenerationState<F>,
|
||||||
) -> Result<(), ProgramError> {
|
) -> Result<(), ProgramError> {
|
||||||
if let Some(_) = state.jumpdest_addresses {
|
if state.jumpdest_addresses.is_some() {
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
const JUMP_OPCODE: u8 = 0x56;
|
const JUMP_OPCODE: u8 = 0x56;
|
||||||
|
|||||||
@ -410,7 +410,7 @@ impl<'a> Iterator for CodeIterator<'a> {
|
|||||||
}
|
}
|
||||||
let opcode = code[*pos];
|
let opcode = code[*pos];
|
||||||
let old_pos = *pos;
|
let old_pos = *pos;
|
||||||
*pos += if opcode >= PUSH1_OPCODE && opcode <= PUSH32_OPCODE {
|
*pos += if (PUSH1_OPCODE..=PUSH32_OPCODE).contains(&opcode) {
|
||||||
(opcode - PUSH1_OPCODE + 2).into()
|
(opcode - PUSH1_OPCODE + 2).into()
|
||||||
} else {
|
} else {
|
||||||
1
|
1
|
||||||
|
|||||||
@ -177,7 +177,7 @@ impl<F: Field> GenerationState<F> {
|
|||||||
pub(crate) fn soft_clone(&self) -> GenerationState<F> {
|
pub(crate) fn soft_clone(&self) -> GenerationState<F> {
|
||||||
Self {
|
Self {
|
||||||
inputs: self.inputs.clone(),
|
inputs: self.inputs.clone(),
|
||||||
registers: self.registers.clone(),
|
registers: self.registers,
|
||||||
memory: self.memory.clone(),
|
memory: self.memory.clone(),
|
||||||
traces: Traces::default(),
|
traces: Traces::default(),
|
||||||
rlp_prover_inputs: self.rlp_prover_inputs.clone(),
|
rlp_prover_inputs: self.rlp_prover_inputs.clone(),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user