Explorar o código

sdk/crypto/smt/util: redundant clone removed

skoupidi hai 1 ano
pai
achega
113d2fe468
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/sdk/src/crypto/smt/util.rs

+ 1 - 1
src/sdk/src/crypto/smt/util.rs

@@ -83,7 +83,7 @@ pub(super) fn leaf_pos_to_index<const N: usize, F: FieldElement>(pos: &F) -> Big
     // 2^N - 1
     // 2^N - 1
     let final_level_index = (BigUint::from(1u32) << (N as u64)) - 1u32;
     let final_level_index = (BigUint::from(1u32) << (N as u64)) - 1u32;
 
 
-    final_level_index.clone() + pos.as_biguint()
+    final_level_index + pos.as_biguint()
 }
 }
 
 
 /// Returns the log2 value of the given number. Used for converting the index to the level.
 /// Returns the log2 value of the given number. Used for converting the index to the level.