Use AsRef<Path>
instead of PathBuf
for parameters (#23560)
This commit is contained in:
@ -1053,12 +1053,12 @@ pub fn path_to_file_name_str(path: &Path) -> Result<&str> {
|
||||
/// Build the full snapshot archive path from its components: the snapshot archives directory, the
|
||||
/// snapshot slot, the accounts hash, and the archive format.
|
||||
pub fn build_full_snapshot_archive_path(
|
||||
snapshot_archives_dir: PathBuf,
|
||||
snapshot_archives_dir: impl AsRef<Path>,
|
||||
slot: Slot,
|
||||
hash: &Hash,
|
||||
archive_format: ArchiveFormat,
|
||||
) -> PathBuf {
|
||||
snapshot_archives_dir.join(format!(
|
||||
snapshot_archives_dir.as_ref().join(format!(
|
||||
"snapshot-{}-{}.{}",
|
||||
slot,
|
||||
hash,
|
||||
@ -1070,13 +1070,13 @@ pub fn build_full_snapshot_archive_path(
|
||||
/// directory, the snapshot base slot, the snapshot slot, the accounts hash, and the archive
|
||||
/// format.
|
||||
pub fn build_incremental_snapshot_archive_path(
|
||||
snapshot_archives_dir: PathBuf,
|
||||
snapshot_archives_dir: impl AsRef<Path>,
|
||||
base_slot: Slot,
|
||||
slot: Slot,
|
||||
hash: &Hash,
|
||||
archive_format: ArchiveFormat,
|
||||
) -> PathBuf {
|
||||
snapshot_archives_dir.join(format!(
|
||||
snapshot_archives_dir.as_ref().join(format!(
|
||||
"incremental-snapshot-{}-{}-{}.{}",
|
||||
base_slot,
|
||||
slot,
|
||||
|
Reference in New Issue
Block a user