Skip to content

Commit a516651

Browse files
committed
clippy: fix some new lints
1 parent 07ac274 commit a516651

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

jets-bench/benches/elements/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ fn bench(c: &mut Criterion) {
471471
let (src_ty, tgt_ty) = jet_arrow(jet);
472472
let env = env_sampler.env();
473473

474-
let mut group = c.benchmark_group(&format!("{}", jet.to_string()));
474+
let mut group = c.benchmark_group(&jet.to_string());
475475
for i in 0..NUM_RANDOM_SAMPLES {
476476
let params = JetParams::with_rand_aligns(InputSampling::Random);
477477
let name = format!("{}", i);
@@ -531,7 +531,7 @@ fn bench(c: &mut Criterion) {
531531
let (src_ty, tgt_ty) = jet_arrow(jet);
532532
let env = EnvSampling::Null.env();
533533

534-
let mut group = c.benchmark_group(&format!("{}", jet.to_string()));
534+
let mut group = c.benchmark_group(&jet.to_string());
535535
for i in 0..NUM_RANDOM_SAMPLES {
536536
let params = JetParams::with_rand_aligns(InputSampling::Custom(inp_fn.clone()));
537537
let name = format!("{}", i);
@@ -612,7 +612,7 @@ fn bench(c: &mut Criterion) {
612612
for (jet, index, env_type) in arr {
613613
let (src_ty, tgt_ty) = jet_arrow(jet);
614614
let env = env_type.env();
615-
let mut group = c.benchmark_group(&format!("{}", jet.to_string()));
615+
let mut group = c.benchmark_group(&jet.to_string());
616616

617617
for i in 0..NUM_RANDOM_SAMPLES {
618618
// We always select the current input because this is where we

src/bit_encoding/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ mod tests {
410410
#[test]
411411
fn root_unit_to_unit() {
412412
// main = jet_eq_32 :: 2^64 -> 2 # 7387d279
413-
let justjet = vec![0x6d, 0xb8, 0x80];
413+
let justjet = [0x6d, 0xb8, 0x80];
414414
// Should be able to decode this as an expression...
415415
let mut iter = BitIter::from(&justjet[..]);
416416
decode_expression::<_, Core>(&mut iter).unwrap();

src/bit_machine/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,23 +528,23 @@ mod tests {
528528
prog.cmr().to_string(),
529529
cmr_str,
530530
"CMR mismatch (got {} expected {}) for program {}",
531-
prog.cmr().to_string(),
531+
prog.cmr(),
532532
cmr_str,
533533
prog_hex,
534534
);
535535
assert_eq!(
536536
prog.imr().to_string(),
537537
imr_str,
538538
"IMR mismatch (got {} expected {}) for program {}",
539-
prog.imr().to_string(),
539+
prog.imr(),
540540
imr_str,
541541
prog_hex,
542542
);
543543
assert_eq!(
544544
prog.amr().to_string(),
545545
amr_str,
546546
"AMR mismatch (got {} expected {}) for program {}",
547-
prog.amr().to_string(),
547+
prog.amr(),
548548
amr_str,
549549
prog_hex,
550550
);

src/node/commit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ mod tests {
314314
prog.cmr().to_string(),
315315
cmr_str,
316316
"CMR mismatch (got {} expected {}) for program {}",
317-
prog.cmr().to_string(),
317+
prog.cmr(),
318318
cmr_str,
319319
prog_hex,
320320
);

src/node/redeem.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ mod tests {
366366
prog.cmr().to_string(),
367367
cmr_str,
368368
"CMR mismatch (got {} expected {}) for program {}",
369-
prog.cmr().to_string(),
369+
prog.cmr(),
370370
cmr_str,
371371
prog_hex,
372372
);
@@ -375,15 +375,15 @@ mod tests {
375375
prog.amr().to_string(),
376376
amr_str,
377377
"AMR mismatch (got {} expected {}) for program {}",
378-
prog.amr().to_string(),
378+
prog.amr(),
379379
amr_str,
380380
prog_hex,
381381
);
382382
assert_eq!(
383383
prog.imr().to_string(),
384384
imr_str,
385385
"IMR mismatch (got {} expected {}) for program {}",
386-
prog.imr().to_string(),
386+
prog.imr(),
387387
imr_str,
388388
prog_hex,
389389
);
@@ -426,7 +426,7 @@ mod tests {
426426
//
427427
// wits_are_equal = comp (pair wit1 wit2) jet_eq_32 :: 1 -> 2
428428
// main = comp wits_are_equal jet_verify :: 1 -> 1
429-
let eqwits = vec![0xcd, 0xdc, 0x51, 0xb6, 0xe2, 0x08, 0xc0, 0x40];
429+
let eqwits = [0xcd, 0xdc, 0x51, 0xb6, 0xe2, 0x08, 0xc0, 0x40];
430430
let mut iter = BitIter::from(&eqwits[..]);
431431
let eqwits_prog = CommitNode::<Core>::decode(&mut iter).unwrap();
432432

@@ -474,7 +474,7 @@ mod tests {
474474
#[test]
475475
fn witness_consumed() {
476476
// "main = unit", but with a witness attached. Found by fuzzer.
477-
let badwit = vec![0x27, 0x00];
477+
let badwit = [0x27, 0x00];
478478
let mut iter = BitIter::from(&badwit[..]);
479479
if let Err(Error::InconsistentWitnessLength) =
480480
RedeemNode::<crate::jet::Core>::decode(&mut iter)

0 commit comments

Comments
 (0)