diff --git a/evm/src/bin/assemble.rs b/evm/src/bin/assemble.rs index 68eeadf8..1cf3a67c 100644 --- a/evm/src/bin/assemble.rs +++ b/evm/src/bin/assemble.rs @@ -9,5 +9,5 @@ fn main() { args.next(); let file_contents: Vec<_> = args.map(|path| fs::read_to_string(path).unwrap()).collect(); let assembled = assemble_to_bytes(&file_contents[..]); - println!("{}", encode(&assembled)); + println!("{}", encode(assembled)); } diff --git a/evm/src/cpu/kernel/assembler.rs b/evm/src/cpu/kernel/assembler.rs index 09af71bf..aad2dd53 100644 --- a/evm/src/cpu/kernel/assembler.rs +++ b/evm/src/cpu/kernel/assembler.rs @@ -83,7 +83,7 @@ impl Macro { self.params .iter() .position(|p| p == param) - .unwrap_or_else(|| panic!("No such param: {} {:?}", param, &self.params)) + .unwrap_or_else(|| panic!("No such param: {param} {:?}", &self.params)) } } @@ -140,7 +140,7 @@ fn find_macros(files: &[File]) -> HashMap { items: items.clone(), }; let old = macros.insert(signature.clone(), macro_); - assert!(old.is_none(), "Duplicate macro signature: {:?}", signature); + assert!(old.is_none(), "Duplicate macro signature: {signature:?}"); } } } @@ -186,9 +186,9 @@ fn expand_macro_call( }; let macro_ = macros .get(&signature) - .unwrap_or_else(|| panic!("No such macro: {:?}", signature)); + .unwrap_or_else(|| panic!("No such macro: {signature:?}")); - let get_actual_label = |macro_label| format!("@{}.{}", macro_counter, macro_label); + let get_actual_label = |macro_label| format!("@{macro_counter}.{macro_label}"); let get_arg = |var| { let param_index = macro_.get_param_index(var); @@ -242,7 +242,7 @@ fn inline_constants(body: Vec, constants: &HashMap) -> Vec { - panic!("Item should have been expanded already: {:?}", item); + panic!("Item should have been expanded already: {item:?}"); } Item::GlobalLabelDeclaration(label) => { let old = global_labels.insert(label.clone(), *offset); - assert!(old.is_none(), "Duplicate global label: {}", label); + assert!(old.is_none(), "Duplicate global label: {label}"); } Item::LocalLabelDeclaration(label) => { let old = local_labels.insert(label.clone(), *offset); - assert!(old.is_none(), "Duplicate local label: {}", label); + assert!(old.is_none(), "Duplicate local label: {label}"); } Item::Push(target) => *offset += 1 + push_target_size(target) as usize, Item::ProverInput(prover_input_fn) => { @@ -319,7 +319,7 @@ fn assemble_file( | Item::Repeat(_, _) | Item::StackManipulation(_, _) | Item::MacroLabelDeclaration(_) => { - panic!("Item should have been expanded already: {:?}", item); + panic!("Item should have been expanded already: {item:?}"); } Item::GlobalLabelDeclaration(_) | Item::LocalLabelDeclaration(_) => { // Nothing to do; we processed labels in the prior phase. @@ -331,7 +331,7 @@ fn assemble_file( let offset = local_labels .get(&label) .or_else(|| global_labels.get(&label)) - .unwrap_or_else(|| panic!("No such label: {}", label)); + .unwrap_or_else(|| panic!("No such label: {label}")); // We want the BYTES_PER_OFFSET least significant bytes in BE order. // It's easiest to rev the first BYTES_PER_OFFSET bytes of the LE encoding. (0..BYTES_PER_OFFSET) @@ -339,9 +339,9 @@ fn assemble_file( .map(|i| offset.to_le_bytes()[i as usize]) .collect() } - PushTarget::MacroLabel(v) => panic!("Macro label not in a macro: {}", v), - PushTarget::MacroVar(v) => panic!("Variable not in a macro: {}", v), - PushTarget::Constant(c) => panic!("Constant wasn't inlined: {}", c), + PushTarget::MacroLabel(v) => panic!("Macro label not in a macro: {v}"), + PushTarget::MacroVar(v) => panic!("Variable not in a macro: {v}"), + PushTarget::Constant(c) => panic!("Constant wasn't inlined: {c}"), }; code.push(get_push_opcode(target_bytes.len() as u8)); code.extend(target_bytes); @@ -362,9 +362,9 @@ fn push_target_size(target: &PushTarget) -> u8 { match target { PushTarget::Literal(n) => u256_to_trimmed_be_bytes(n).len() as u8, PushTarget::Label(_) => BYTES_PER_OFFSET, - PushTarget::MacroLabel(v) => panic!("Macro label not in a macro: {}", v), - PushTarget::MacroVar(v) => panic!("Variable not in a macro: {}", v), - PushTarget::Constant(c) => panic!("Constant wasn't inlined: {}", c), + PushTarget::MacroLabel(v) => panic!("Macro label not in a macro: {v}"), + PushTarget::MacroVar(v) => panic!("Variable not in a macro: {v}"), + PushTarget::Constant(c) => panic!("Constant wasn't inlined: {c}"), } } diff --git a/evm/src/cpu/kernel/cost_estimator.rs b/evm/src/cpu/kernel/cost_estimator.rs index 3dfcf63a..ae837647 100644 --- a/evm/src/cpu/kernel/cost_estimator.rs +++ b/evm/src/cpu/kernel/cost_estimator.rs @@ -21,7 +21,7 @@ fn cost_estimate_item(item: &Item) -> u32 { Push(Label(_)) => cost_estimate_push(BYTES_PER_OFFSET as usize), ProverInput(_) => 1, StandardOp(op) => cost_estimate_standard_op(op.as_str()), - _ => panic!("Unexpected item: {:?}", item), + _ => panic!("Unexpected item: {item:?}"), } } diff --git a/evm/src/cpu/kernel/interpreter.rs b/evm/src/cpu/kernel/interpreter.rs index f6cae73e..8057792b 100644 --- a/evm/src/cpu/kernel/interpreter.rs +++ b/evm/src/cpu/kernel/interpreter.rs @@ -328,7 +328,7 @@ impl<'a> Interpreter<'a> { if self.debug_offsets.contains(&self.offset) { println!("At {}, stack={:?}", self.offset_name(), self.stack()); } else if let Some(label) = self.offset_label() { - println!("At {}", label); + println!("At {label}"); } Ok(()) diff --git a/evm/src/cpu/kernel/opcodes.rs b/evm/src/cpu/kernel/opcodes.rs index 20601267..31074ff6 100644 --- a/evm/src/cpu/kernel/opcodes.rs +++ b/evm/src/cpu/kernel/opcodes.rs @@ -134,6 +134,6 @@ pub(crate) fn get_opcode(mnemonic: &str) -> u8 { "REVERT" => 0xfd, "INVALID" => 0xfe, "SELFDESTRUCT" => 0xff, - _ => panic!("Unrecognized mnemonic {}", mnemonic), + _ => panic!("Unrecognized mnemonic {mnemonic}"), } } diff --git a/evm/src/cpu/kernel/stack/stack_manipulation.rs b/evm/src/cpu/kernel/stack/stack_manipulation.rs index 36e4b83a..73a24029 100644 --- a/evm/src/cpu/kernel/stack/stack_manipulation.rs +++ b/evm/src/cpu/kernel/stack/stack_manipulation.rs @@ -35,7 +35,7 @@ fn expand(names: Vec, replacements: Vec) -> stack_blocks.insert(name.clone(), n); (0..n) .map(|i| { - let literal_name = format!("@{}.{}", name, i); + let literal_name = format!("@{name}.{i}"); StackItem::NamedItem(literal_name) }) .collect_vec() @@ -52,7 +52,7 @@ fn expand(names: Vec, replacements: Vec) -> let n = *stack_blocks.get(&name).unwrap(); (0..n) .map(|i| { - let literal_name = format!("@{}.{}", name, i); + let literal_name = format!("@{name}.{i}"); StackItem::NamedItem(literal_name) }) .collect_vec() @@ -64,7 +64,7 @@ fn expand(names: Vec, replacements: Vec) -> StackReplacement::MacroLabel(_) | StackReplacement::MacroVar(_) | StackReplacement::Constant(_) => { - panic!("Should have been expanded already: {:?}", item) + panic!("Should have been expanded already: {item:?}") } }) .collect_vec(); @@ -157,7 +157,7 @@ fn shortest_path( } } - panic!("No path found from {:?} to {:?}", src, dst) + panic!("No path found from {src:?} to {dst:?}") } /// A node in the priority queue used by Dijkstra's algorithm. @@ -279,7 +279,7 @@ impl StackOp { PushTarget::MacroLabel(_) | PushTarget::MacroVar(_) | PushTarget::Constant(_) => { - panic!("Target should have been expanded already: {:?}", target) + panic!("Target should have been expanded already: {target:?}") } }; // This is just a rough estimate; we can update it after implementing PUSH. @@ -326,8 +326,8 @@ impl StackOp { match self { StackOp::Push(target) => Item::Push(target), Pop => Item::StandardOp("POP".into()), - StackOp::Dup(n) => Item::StandardOp(format!("DUP{}", n)), - StackOp::Swap(n) => Item::StandardOp(format!("SWAP{}", n)), + StackOp::Dup(n) => Item::StandardOp(format!("DUP{n}")), + StackOp::Swap(n) => Item::StandardOp(format!("SWAP{n}")), } } } diff --git a/evm/src/cpu/kernel/tests/curve_ops.rs b/evm/src/cpu/kernel/tests/curve_ops.rs index 0aaa94ea..9ba24185 100644 --- a/evm/src/cpu/kernel/tests/curve_ops.rs +++ b/evm/src/cpu/kernel/tests/curve_ops.rs @@ -150,7 +150,7 @@ mod bn { assert_eq!(stack, vec![U256::MAX, U256::MAX]); // Multiple calls - let ec_mul_hex = format!("0x{:x}", ec_mul); + let ec_mul_hex = format!("0x{ec_mul:x}"); let initial_stack = u256ify([ "0xdeadbeef", s, @@ -288,7 +288,7 @@ mod secp { assert_eq!(stack, u256ify([identity.1, identity.0])?); // Multiple calls - let ec_mul_hex = format!("0x{:x}", ec_mul); + let ec_mul_hex = format!("0x{ec_mul:x}"); let initial_stack = u256ify([ "0xdeadbeef", s, diff --git a/field/src/extension/algebra.rs b/field/src/extension/algebra.rs index 54bea694..5840ae81 100644 --- a/field/src/extension/algebra.rs +++ b/field/src/extension/algebra.rs @@ -45,7 +45,7 @@ impl, const D: usize> Display for ExtensionAlgebra { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { write!(f, "({})", self.0[0])?; for i in 1..D { - write!(f, " + ({})*b^{}", self.0[i], i)?; + write!(f, " + ({})*b^{i}", self.0[i])?; } Ok(()) } diff --git a/insertion/src/insertion_gate.rs b/insertion/src/insertion_gate.rs index ea8f4194..2757dd23 100644 --- a/insertion/src/insertion_gate.rs +++ b/insertion/src/insertion_gate.rs @@ -73,7 +73,7 @@ impl, const D: usize> InsertionGate { impl, const D: usize> Gate for InsertionGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/benches/hashing.rs b/plonky2/benches/hashing.rs index 4632c4c4..673e0572 100644 --- a/plonky2/benches/hashing.rs +++ b/plonky2/benches/hashing.rs @@ -24,7 +24,7 @@ pub(crate) fn bench_keccak(c: &mut Criterion) { pub(crate) fn bench_poseidon(c: &mut Criterion) { c.bench_function( - &format!("poseidon<{}, {}>", type_name::(), SPONGE_WIDTH), + &format!("poseidon<{}, {SPONGE_WIDTH}>", type_name::()), |b| { b.iter_batched( || F::rand_arr::(), diff --git a/plonky2/examples/square_root.rs b/plonky2/examples/square_root.rs index 0bc89f47..7d4d2fee 100644 --- a/plonky2/examples/square_root.rs +++ b/plonky2/examples/square_root.rs @@ -31,7 +31,7 @@ impl, const D: usize> SimpleGenerator let x_squared = witness.get_target(self.x_squared); let x = x_squared.sqrt().unwrap(); - println!("Square root: {}", x); + println!("Square root: {x}"); out_buffer.set_target(self.x, x); } @@ -75,7 +75,7 @@ fn main() -> Result<()> { let proof = data.prove(pw.clone())?; let x_squared_actual = proof.public_inputs[0]; - println!("Field element (square): {}", x_squared_actual); + println!("Field element (square): {x_squared_actual}"); data.verify(proof) } diff --git a/plonky2/src/bin/generate_constants.rs b/plonky2/src/bin/generate_constants.rs index 258c6b78..c5f8fae2 100644 --- a/plonky2/src/bin/generate_constants.rs +++ b/plonky2/src/bin/generate_constants.rs @@ -21,7 +21,7 @@ pub(crate) fn main() { // Print the constants in the format we prefer in our code. for chunk in constants.chunks(4) { for (i, c) in chunk.iter().enumerate() { - print!("{:#018x},", c); + print!("{c:#018x},"); if i != chunk.len() - 1 { print!(" "); } diff --git a/plonky2/src/fri/recursive_verifier.rs b/plonky2/src/fri/recursive_verifier.rs index ac7e3a87..d14420c1 100644 --- a/plonky2/src/fri/recursive_verifier.rs +++ b/plonky2/src/fri/recursive_verifier.rs @@ -176,7 +176,7 @@ impl, const D: usize> CircuitBuilder { with_context!( self, level, - &format!("verify one (of {}) query rounds", num_queries), + &format!("verify one (of {num_queries}) query rounds"), self.fri_verifier_query_round::( instance, challenges, @@ -207,7 +207,7 @@ impl, const D: usize> CircuitBuilder { { with_context!( self, - &format!("verify {}'th initial Merkle proof", i), + &format!("verify {i}'th initial Merkle proof"), self.verify_merkle_proof_to_cap_with_cap_index::( evals.clone(), x_index_bits, diff --git a/plonky2/src/gates/arithmetic_base.rs b/plonky2/src/gates/arithmetic_base.rs index 207af2d0..03560faf 100644 --- a/plonky2/src/gates/arithmetic_base.rs +++ b/plonky2/src/gates/arithmetic_base.rs @@ -53,7 +53,7 @@ impl ArithmeticGate { impl, const D: usize> Gate for ArithmeticGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/arithmetic_extension.rs b/plonky2/src/gates/arithmetic_extension.rs index e4e07f83..26b7074b 100644 --- a/plonky2/src/gates/arithmetic_extension.rs +++ b/plonky2/src/gates/arithmetic_extension.rs @@ -51,7 +51,7 @@ impl ArithmeticExtensionGate { impl, const D: usize> Gate for ArithmeticExtensionGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/base_sum.rs b/plonky2/src/gates/base_sum.rs index 5be54eeb..1252c8e3 100644 --- a/plonky2/src/gates/base_sum.rs +++ b/plonky2/src/gates/base_sum.rs @@ -49,7 +49,7 @@ impl BaseSumGate { impl, const D: usize, const B: usize> Gate for BaseSumGate { fn id(&self) -> String { - format!("{:?} + Base: {}", self, B) + format!("{self:?} + Base: {B}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/constant.rs b/plonky2/src/gates/constant.rs index 7d68b088..513caad9 100644 --- a/plonky2/src/gates/constant.rs +++ b/plonky2/src/gates/constant.rs @@ -33,7 +33,7 @@ impl ConstantGate { impl, const D: usize> Gate for ConstantGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/exponentiation.rs b/plonky2/src/gates/exponentiation.rs index aa977308..ca1ba395 100644 --- a/plonky2/src/gates/exponentiation.rs +++ b/plonky2/src/gates/exponentiation.rs @@ -70,7 +70,7 @@ impl, const D: usize> ExponentiationGate { impl, const D: usize> Gate for ExponentiationGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/high_degree_interpolation.rs b/plonky2/src/gates/high_degree_interpolation.rs index bcdf2276..0bc4ab65 100644 --- a/plonky2/src/gates/high_degree_interpolation.rs +++ b/plonky2/src/gates/high_degree_interpolation.rs @@ -87,7 +87,7 @@ impl, const D: usize> Gate for HighDegreeInterpolationGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/low_degree_interpolation.rs b/plonky2/src/gates/low_degree_interpolation.rs index 3edc4175..8fd2ed47 100644 --- a/plonky2/src/gates/low_degree_interpolation.rs +++ b/plonky2/src/gates/low_degree_interpolation.rs @@ -80,7 +80,7 @@ impl, const D: usize> LowDegreeInterpolationGate, const D: usize> Gate for LowDegreeInterpolationGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/multiplication_extension.rs b/plonky2/src/gates/multiplication_extension.rs index ab29bba7..8e6b44d7 100644 --- a/plonky2/src/gates/multiplication_extension.rs +++ b/plonky2/src/gates/multiplication_extension.rs @@ -48,7 +48,7 @@ impl MulExtensionGate { impl, const D: usize> Gate for MulExtensionGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/poseidon.rs b/plonky2/src/gates/poseidon.rs index 3ae8db83..26ec2594 100644 --- a/plonky2/src/gates/poseidon.rs +++ b/plonky2/src/gates/poseidon.rs @@ -98,7 +98,7 @@ impl, const D: usize> PoseidonGate { impl, const D: usize> Gate for PoseidonGate { fn id(&self) -> String { - format!("{:?}", self, SPONGE_WIDTH) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/poseidon_mds.rs b/plonky2/src/gates/poseidon_mds.rs index 2ccfa640..289246e1 100644 --- a/plonky2/src/gates/poseidon_mds.rs +++ b/plonky2/src/gates/poseidon_mds.rs @@ -117,7 +117,7 @@ impl + Poseidon, const D: usize> PoseidonMdsGate + Poseidon, const D: usize> Gate for PoseidonMdsGate { fn id(&self) -> String { - format!("{:?}", self, SPONGE_WIDTH) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/random_access.rs b/plonky2/src/gates/random_access.rs index fa365f16..3ea2f55e 100644 --- a/plonky2/src/gates/random_access.rs +++ b/plonky2/src/gates/random_access.rs @@ -115,7 +115,7 @@ impl, const D: usize> RandomAccessGate { impl, const D: usize> Gate for RandomAccessGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/reducing.rs b/plonky2/src/gates/reducing.rs index 31960b64..02f8ac2d 100644 --- a/plonky2/src/gates/reducing.rs +++ b/plonky2/src/gates/reducing.rs @@ -55,7 +55,7 @@ impl ReducingGate { impl, const D: usize> Gate for ReducingGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/plonky2/src/gates/reducing_extension.rs b/plonky2/src/gates/reducing_extension.rs index 2ae25059..8b04ec99 100644 --- a/plonky2/src/gates/reducing_extension.rs +++ b/plonky2/src/gates/reducing_extension.rs @@ -58,7 +58,7 @@ impl ReducingExtensionGate { impl, const D: usize> Gate for ReducingExtensionGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/u32/src/gates/add_many_u32.rs b/u32/src/gates/add_many_u32.rs index 622c3df3..f37075cd 100644 --- a/u32/src/gates/add_many_u32.rs +++ b/u32/src/gates/add_many_u32.rs @@ -84,7 +84,7 @@ impl, const D: usize> U32AddManyGate { impl, const D: usize> Gate for U32AddManyGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/u32/src/gates/arithmetic_u32.rs b/u32/src/gates/arithmetic_u32.rs index c05ed86c..47889954 100644 --- a/u32/src/gates/arithmetic_u32.rs +++ b/u32/src/gates/arithmetic_u32.rs @@ -86,7 +86,7 @@ impl, const D: usize> U32ArithmeticGate { impl, const D: usize> Gate for U32ArithmeticGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/u32/src/gates/comparison.rs b/u32/src/gates/comparison.rs index 6af34208..a2a0cfcf 100644 --- a/u32/src/gates/comparison.rs +++ b/u32/src/gates/comparison.rs @@ -91,7 +91,7 @@ impl, const D: usize> ComparisonGate { impl, const D: usize> Gate for ComparisonGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/u32/src/gates/range_check_u32.rs b/u32/src/gates/range_check_u32.rs index 615abb98..6e8f2cd5 100644 --- a/u32/src/gates/range_check_u32.rs +++ b/u32/src/gates/range_check_u32.rs @@ -48,7 +48,7 @@ impl, const D: usize> U32RangeCheckGate { impl, const D: usize> Gate for U32RangeCheckGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/u32/src/gates/subtraction_u32.rs b/u32/src/gates/subtraction_u32.rs index 3737de55..b08d900b 100644 --- a/u32/src/gates/subtraction_u32.rs +++ b/u32/src/gates/subtraction_u32.rs @@ -80,7 +80,7 @@ impl, const D: usize> U32SubtractionGate { impl, const D: usize> Gate for U32SubtractionGate { fn id(&self) -> String { - format!("{:?}", self) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/util/src/lib.rs b/util/src/lib.rs index bbc2af98..b22a4236 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -31,7 +31,7 @@ pub fn log2_ceil(n: usize) -> usize { /// Computes `log_2(n)`, panicking if `n` is not a power of two. pub fn log2_strict(n: usize) -> usize { let res = n.trailing_zeros(); - assert!(n.wrapping_shr(res) == 1, "Not a power of two: {}", n); + assert!(n.wrapping_shr(res) == 1, "Not a power of two: {n}"); // Tell the optimizer about the semantics of `log2_strict`. i.e. it can replace `n` with // `1 << res` and vice versa. assume(n == 1 << res); diff --git a/waksman/src/gates/assert_le.rs b/waksman/src/gates/assert_le.rs index c67a7125..27242370 100644 --- a/waksman/src/gates/assert_le.rs +++ b/waksman/src/gates/assert_le.rs @@ -84,7 +84,7 @@ impl, const D: usize> AssertLessThanGate { impl, const D: usize> Gate for AssertLessThanGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec { diff --git a/waksman/src/gates/switch.rs b/waksman/src/gates/switch.rs index 2c2ca8c8..4509bf0a 100644 --- a/waksman/src/gates/switch.rs +++ b/waksman/src/gates/switch.rs @@ -74,7 +74,7 @@ impl, const D: usize> SwitchGate { impl, const D: usize> Gate for SwitchGate { fn id(&self) -> String { - format!("{:?}", self, D) + format!("{self:?}") } fn eval_unfiltered(&self, vars: EvaluationVars) -> Vec {