From eb37ed0da505f763049c7dfaeb0bbca1566a5038 Mon Sep 17 00:00:00 2001 From: microproofs Date: Fri, 20 Sep 2024 13:47:56 -0400 Subject: [PATCH] Clippy fix --- crates/uplc/src/flat.rs | 16 ++++------------ crates/uplc/src/optimize/shrinker.rs | 4 ++-- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/crates/uplc/src/flat.rs b/crates/uplc/src/flat.rs index fb363cc25..6467cc24d 100644 --- a/crates/uplc/src/flat.rs +++ b/crates/uplc/src/flat.rs @@ -676,9 +676,7 @@ impl<'b> Decode<'b> for Constant { de::Error::Message(format!("Failed to uncompress p1: {}", err)) })?; - Err(de::Error::Message(format!( - "BLS12-381 G1 points are not supported for flat decoding." - ))) + Err(de::Error::Message("BLS12-381 G1 points are not supported for flat decoding.".to_string())) } [10] => { @@ -688,9 +686,7 @@ impl<'b> Decode<'b> for Constant { de::Error::Message(format!("Failed to uncompress p2: {}", err)) })?; - Err(de::Error::Message(format!( - "BLS12-381 G2 points are not supported for flat decoding." - ))) + Err(de::Error::Message("BLS12-381 G2 points are not supported for flat decoding.".to_string())) } [11] => Err(de::Error::Message( "BLS12-381 ML results are not supported for flat decoding".to_string(), @@ -740,9 +736,7 @@ fn decode_constant_value(typ: Rc, d: &mut Decoder) -> Result { let p2 = Vec::::decode(d)?; @@ -750,9 +744,7 @@ fn decode_constant_value(typ: Rc, d: &mut Decoder) -> Result Err(de::Error::Message( "BLS12-381 ML results are not supported for flat decoding".to_string(), diff --git a/crates/uplc/src/optimize/shrinker.rs b/crates/uplc/src/optimize/shrinker.rs index 72dbf68c3..9a96283ea 100644 --- a/crates/uplc/src/optimize/shrinker.rs +++ b/crates/uplc/src/optimize/shrinker.rs @@ -1152,7 +1152,7 @@ impl Program { { *term = Term::var(format!("blst_p1_index_{}", index)); } else { - blst_p1_list.push(blst_p1.as_ref().clone()); + blst_p1_list.push(*blst_p1.as_ref()); *term = Term::var(format!("blst_p1_index_{}", blst_p1_list.len() - 1)); } } @@ -1163,7 +1163,7 @@ impl Program { { *term = Term::var(format!("blst_p2_index_{}", index)); } else { - blst_p2_list.push(blst_p2.as_ref().clone()); + blst_p2_list.push(*blst_p2.as_ref()); *term = Term::var(format!("blst_p2_index_{}", blst_p2_list.len() - 1)); } }