Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(storage): remove redundant clones #1277

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading