diff --git a/runtime/src/snapshot_bank_utils.rs b/runtime/src/snapshot_bank_utils.rs index c2fdeb71d1118d..f9a2059e46233d 100644 --- a/runtime/src/snapshot_bank_utils.rs +++ b/runtime/src/snapshot_bank_utils.rs @@ -1151,8 +1151,8 @@ pub fn package_and_archive_full_snapshot( AccountsPackageKind::Snapshot(SnapshotKind::FullSnapshot), bank, bank_snapshot_info, - &full_snapshot_archives_dir, - &incremental_snapshot_archives_dir, + full_snapshot_archives_dir.as_ref(), + incremental_snapshot_archives_dir.as_ref(), snapshot_storages, archive_format, snapshot_version, @@ -1203,8 +1203,8 @@ pub fn package_and_archive_incremental_snapshot( )), bank, bank_snapshot_info, - &full_snapshot_archives_dir, - &incremental_snapshot_archives_dir, + full_snapshot_archives_dir.as_ref(), + incremental_snapshot_archives_dir.as_ref(), snapshot_storages, archive_format, snapshot_version, diff --git a/runtime/src/snapshot_package.rs b/runtime/src/snapshot_package.rs index 67af859cd061d2..2e8af24c7a0c9e 100644 --- a/runtime/src/snapshot_package.rs +++ b/runtime/src/snapshot_package.rs @@ -54,8 +54,8 @@ impl AccountsPackage { package_kind: AccountsPackageKind, bank: &Bank, bank_snapshot_info: &BankSnapshotInfo, - full_snapshot_archives_dir: impl AsRef, - incremental_snapshot_archives_dir: impl AsRef, + full_snapshot_archives_dir: impl Into, + incremental_snapshot_archives_dir: impl Into, snapshot_storages: Vec>, archive_format: ArchiveFormat, snapshot_version: SnapshotVersion, @@ -81,10 +81,8 @@ impl AccountsPackage { bank_snapshot_dir: bank_snapshot_info.snapshot_dir.clone(), archive_format, snapshot_version, - full_snapshot_archives_dir: full_snapshot_archives_dir.as_ref().to_path_buf(), - incremental_snapshot_archives_dir: incremental_snapshot_archives_dir - .as_ref() - .to_path_buf(), + full_snapshot_archives_dir: full_snapshot_archives_dir.into(), + incremental_snapshot_archives_dir: incremental_snapshot_archives_dir.into(), epoch_accounts_hash: bank.get_epoch_accounts_hash_to_serialize(), }; Self::_new(