Просмотр исходного кода

sdk/crypto/smt/util: redundant clone removed

skoupidi 1 год назад
Родитель
Сommit
113d2fe468
1 измененных файлов с 1 добавлено и 1 удалено
  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
     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.