Skip to content

Commit

Permalink
chore(storage): remove redundant clones (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-starkware authored Oct 16, 2023
1 parent bf586b2 commit 32bf727
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/papyrus_storage/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
Expand Down
4 changes: 2 additions & 2 deletions crates/papyrus_storage/src/utils_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 32bf727

Please sign in to comment.