Skip to content

Commit

Permalink
[smt] remove redundant clone (#3143)
Browse files Browse the repository at this point in the history
remove redundant clone
  • Loading branch information
nkysg authored Jan 1, 2025
1 parent 15c0421 commit 509d998
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion moveos/smt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ where
let tree: JellyfishMerkleTree<K, V, NR> = JellyfishMerkleTree::new(&self.node_reader);
let (data, proof) = tree.get_with_proof(state_root.into(), key)?;

let size = data.clone().map(|v| v.raw.len()).unwrap_or(0);
let size = data.as_ref().map(|v| v.raw.len()).unwrap_or(0);
self.metrics
.smt_get_with_proof_bytes
.with_label_values(&[fn_name])
Expand Down

0 comments on commit 509d998

Please sign in to comment.