Skip to content

Commit

Permalink
Uses Into<PathBuf> for params in AccountsPackage::new() (#1349)
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored May 14, 2024
1 parent 0214743 commit c0e9149
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions runtime/src/snapshot_bank_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
10 changes: 4 additions & 6 deletions runtime/src/snapshot_package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ impl AccountsPackage {
package_kind: AccountsPackageKind,
bank: &Bank,
bank_snapshot_info: &BankSnapshotInfo,
full_snapshot_archives_dir: impl AsRef<Path>,
incremental_snapshot_archives_dir: impl AsRef<Path>,
full_snapshot_archives_dir: impl Into<PathBuf>,
incremental_snapshot_archives_dir: impl Into<PathBuf>,
snapshot_storages: Vec<Arc<AccountStorageEntry>>,
archive_format: ArchiveFormat,
snapshot_version: SnapshotVersion,
Expand All @@ -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(
Expand Down

0 comments on commit c0e9149

Please sign in to comment.