about summary refs log tree commit diff
path: root/tvix/store/src/tests/utils.rs
blob: 040b7ee7f51f2e5abe50fe8564313b852e036275 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use crate::pathinfoservice::{MemoryPathInfoService, PathInfoService};
use std::sync::Arc;
use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService};

pub use tvix_castore::utils::*;

pub fn gen_pathinfo_service<BS, DS>(
    blob_service: BS,
    directory_service: DS,
) -> Arc<dyn PathInfoService>
where
    BS: AsRef<dyn BlobService> + Send + Sync + 'static,
    DS: AsRef<dyn DirectoryService> + Send + Sync + 'static,
{
    Arc::new(MemoryPathInfoService::new(blob_service, directory_service))
}