From ae134950b6875dad3e36b4f1998c4891d8ff30ff Mon Sep 17 00:00:00 2001 From: Dan Brownstein Date: Mon, 16 Oct 2023 13:02:07 +0300 Subject: [PATCH] chore(storage): remove redundant clones --- crates/papyrus_storage/src/utils.rs | 2 +- crates/papyrus_storage/src/utils_test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/papyrus_storage/src/utils.rs b/crates/papyrus_storage/src/utils.rs index d218d61d53..29d6e69206 100644 --- a/crates/papyrus_storage/src/utils.rs +++ b/crates/papyrus_storage/src/utils.rs @@ -41,7 +41,7 @@ where /// Dumps the declared_classes table from the storage to a file. pub fn dump_declared_classes_table_to_file(file_path: &str) -> StorageResult<()> { let storage_config = StorageConfig::default(); - let (storage_reader, _) = open_storage(storage_config.clone())?; + let (storage_reader, _) = open_storage(storage_config)?; let txn = storage_reader.begin_ro_txn()?; dump_table_to_file(&txn, &txn.tables.declared_classes, file_path)?; Ok(()) diff --git a/crates/papyrus_storage/src/utils_test.rs b/crates/papyrus_storage/src/utils_test.rs index b891c793be..ed8666ce8e 100644 --- a/crates/papyrus_storage/src/utils_test.rs +++ b/crates/papyrus_storage/src/utils_test.rs @@ -34,9 +34,9 @@ fn test_dump_table_to_file() { let declared_classes = vec![declared_class1.clone(), declared_class2.clone()]; let declared_classes_for_append_state = indexmap!( declared_class1.0 => - (compiled_class_hash, declared_class1.1.clone()), + (compiled_class_hash, declared_class1.1), declared_class2.0 => - (compiled_class_hash, declared_class2.1.clone()), + (compiled_class_hash, declared_class2.1), ); let ((reader, mut writer), _temp_dir) = get_test_storage();