From 4b444069a5cbbd21c4c0d17a7c00b19c476345c0 Mon Sep 17 00:00:00 2001 From: andrewshab <152420261+andrewshab3@users.noreply.github.com> Date: Sat, 14 Feb 2026 10:14:35 +0100 Subject: [PATCH] perf(cli): remove clone in trie repair (#22152) --- crates/cli/commands/src/db/repair_trie.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/cli/commands/src/db/repair_trie.rs b/crates/cli/commands/src/db/repair_trie.rs index 8ea42d2fa2..0286b8f414 100644 --- a/crates/cli/commands/src/db/repair_trie.rs +++ b/crates/cli/commands/src/db/repair_trie.rs @@ -285,7 +285,6 @@ fn verify_and_repair(tool: &DbTool) -> eyre::Result<()> // (We can't just use `upsert` method with a dup cursor, it's not properly // supported) let nibbles = StoredNibblesSubKey(path); - let entry = StorageTrieEntry { nibbles: nibbles.clone(), node }; if storage_trie_cursor .seek_by_key_subkey(account, nibbles.clone())? .filter(|v| v.nibbles == nibbles) @@ -293,6 +292,7 @@ fn verify_and_repair(tool: &DbTool) -> eyre::Result<()> { storage_trie_cursor.delete_current()?; } + let entry = StorageTrieEntry { nibbles, node }; storage_trie_cursor.upsert(account, &entry)?; } Output::Progress(path) => {