fn ensure_directories_for_hash_algorithms_exist(
    repository_path: &Path,
) -> Result<(), anyhow::Error> {
    let mut path_buf = PathBuf::new();
    path_buf.push(repository_path);
    for algorithm in HashAlgorithm::iter() {
        ensure_subdirectory_exists(&path_buf, algorithm)?;
    }
    Ok(())
}
// It is possible, though unlikely, for SHA512, SHA3_512 and BLAKE3 to generate the same
// hash for different content. Separating files by algorithm avoids this type of collision.
// This function ensures that there is a directory under the repository root for each one of
// the supported hash algorithms.
It is possible, though unlikely, for SHA512, SHA3_512 and BLAKE3 to generate the same
hash for different content. Separating files by algorithm avoids this type of collision.
This function ensures that there is a directory under the repository root for each one of
the supported hash algorithms.
It is possible though unlikely for SHA512 SHA3_512 and BLAKE3 to generate the same hash for different content . Separating files by algorithm avoids this type of collision . This function ensures that there is a directory under the repository root for each one of the supported hash algorithms .
fn ensure_directories_for_hash_algorithms_exist(
    repository_path: &Path,
) -> Result<(), anyhow::Error> {
    let mut path_buf = PathBuf::new();
    path_buf.push(repository_path);
    for algorithm in HashAlgorithm::iter() {
        ensure_subdirectory_exists(&path_buf, algorithm)?;
    }
    Ok(())
}
fn ensure_directories_for_hash_algorithms_exist ( repository_path : & Path , ) -> Result < ( ) , anyhow :: Error > { let mut path_buf = PathBuf :: new ( ) ; path_buf . push ( repository_path ) ; for algorithm in HashAlgorithm :: iter ( ) { ensure_subdirectory_exists ( & path_buf , algorithm ) ? ; } Ok ( ( ) ) }
It is possible, though unlikely, for SHA512, SHA3_512 and BLAKE3 to generate the same
hash for different content.
It is possible though unlikely for SHA512 SHA3_512 and BLAKE3 to generate the same hash for different content .
repository_path
&Path
repository_path
&Path