Skip to content

Commit f499735

Browse files
committed
chore: Make clippy v1.88.0 happy
changelog: ignore
1 parent d5da42a commit f499735

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

tasm-lib/src/arithmetic/xfe/to_the_power_of_power_of_2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl BasicSnippet for ToThePowerOfPowerOf2 {
4545

4646
fn code(&self, _: &mut Library) -> Vec<LabelledInstruction> {
4747
let entrypoint = self.entrypoint();
48-
let loop_label = format!("{}_loop", entrypoint);
48+
let loop_label = format!("{entrypoint}_loop");
4949

5050
triton_asm!(
5151
{entrypoint}:

tasm-lib/src/hashing/squeeze_repeatedly.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ mod tests {
135135

136136
for _ in 0..num_states {
137137
let seed: [u8; 32] = rng.random();
138-
println!("testing {} common case with seed: {:x?}", entrypoint, seed);
138+
println!("testing {entrypoint} common case with seed: {seed:x?}");
139139
let ProcedureInitialState {
140140
stack,
141141
nondeterminism,

tasm-lib/src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl Display for InputSource {
1818
InputSource::SecretIn => "secin",
1919
};
2020

21-
write!(f, "{}", str)
21+
write!(f, "{str}")
2222
}
2323
}
2424

tasm-lib/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ pub fn prove_and_verify(
283283
.with_fri_domain_len(fri.domain.length);
284284
println!("{report}");
285285

286-
println!("Done proving. Elapsed time: {:?}", measured_time);
286+
println!("Done proving. Elapsed time: {measured_time:?}");
287287
println!(
288288
"Proof was generated from:
289289
table lengths:

tasm-lib/src/structure/tasm_object.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ impl TasmStructFieldName for &str {
164164

165165
impl TasmStructFieldName for i32 {
166166
fn tasm_struct_field_name(&self) -> String {
167-
format!("field_{}", self)
167+
format!("field_{self}")
168168
}
169169
}
170170

tasm-lib/src/verifier/eval_arg/compute_terminal_const_sized_static_symbols.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,15 @@ impl<const N: usize> BasicSnippet for ComputeTerminalConstSizedStaticSymbols<N>
3636
}
3737

3838
fn entrypoint(&self) -> String {
39+
const IDENTIFIER: &str =
40+
"tasmlib_verifier_eval_arg_compute_terminal_const_sized_static_symbols_symbol_count";
41+
3942
// Prevent name-clashes by hashing all parameters and using this for entrypoint name
4043
let all_variables = [self.symbols.to_vec(), self.initial.coefficients.to_vec()].concat();
4144
let variables_as_digest = Tip5::hash_varlen(&all_variables);
4245
let first_word = variables_as_digest.encode()[0];
43-
format!(
44-
"tasmlib_verifier_eval_arg_compute_terminal_const_sized_static_symbols_symbol_count_{}_{}",
45-
N, first_word
46-
)
46+
47+
format!("{IDENTIFIER}_{N}_{first_word}")
4748
}
4849

4950
fn code(&self, _library: &mut Library) -> Vec<LabelledInstruction> {

tasm-lib/src/verifier/fri/verify.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ mod bench {
17151715
let mut file = File::create(path).expect("open file for writing");
17161716
write!(file, "{profile}").unwrap();
17171717

1718-
println!("{}", profile);
1718+
println!("{profile}");
17191719

17201720
// Don't do this since entrypoint label of FRI snippet is not parameterized over its
17211721
// variables, meaning all benchmarks are overwritten.

tasm-lib/src/verifier/master_table/divide_out_zerofiers.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -281,10 +281,10 @@ mod tests {
281281
let transition_zerofier_inv = except_last_row * consistency_zerofier_inv;
282282
let terminal_zerofier_inv = except_last_row.inverse(); // i.e., only last row
283283

284-
println!("initial zerofier inverse: {}", initial_zerofier_inv);
285-
println!("consistency zerofier inverse: {}", consistency_zerofier_inv);
286-
println!("transition zerofier inverse: {}", transition_zerofier_inv);
287-
println!("terminal zerofier inverse: {}", terminal_zerofier_inv);
284+
println!("initial zerofier inverse: {initial_zerofier_inv}");
285+
println!("consistency zerofier inverse: {consistency_zerofier_inv}");
286+
println!("transition zerofier inverse: {transition_zerofier_inv}");
287+
println!("terminal zerofier inverse: {terminal_zerofier_inv}");
288288

289289
let mut running_total_constraints = 0;
290290
let initial_quotients = air_evaluation_result[running_total_constraints

tasm-lib/src/verifier/stark_verify.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,9 +1346,8 @@ pub mod tests {
13461346

13471347
println!(
13481348
"TASM-verifier of factorial({FACTORIAL_ARGUMENT}):\n
1349-
clock cycle count: {}.\n
1350-
Inner padded height was: {}",
1351-
cycle_count, inner_padded_height,
1349+
clock cycle count: {cycle_count}.\n
1350+
Inner padded height was: {inner_padded_height}",
13521351
);
13531352
}
13541353

@@ -1649,7 +1648,7 @@ mod benches {
16491648
&PublicInput::new(claim_for_proof.input),
16501649
&nondeterminism,
16511650
);
1652-
println!("{}", profile);
1651+
println!("{profile}");
16531652
}
16541653

16551654
#[test]
@@ -1788,6 +1787,6 @@ mod benches {
17881787
&PublicInput::new(claim_for_proof.input),
17891788
&non_determinism,
17901789
);
1791-
println!("{}", profile);
1790+
println!("{profile}");
17921791
}
17931792
}

0 commit comments

Comments
 (0)