diff options
Diffstat (limited to 'tvix/store/src/tests/utils.rs')
-rw-r--r-- | tvix/store/src/tests/utils.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tvix/store/src/tests/utils.rs b/tvix/store/src/tests/utils.rs index 285db449d36d..171919e4e777 100644 --- a/tvix/store/src/tests/utils.rs +++ b/tvix/store/src/tests/utils.rs @@ -1,20 +1,22 @@ +use std::sync::Arc; + use crate::{ blobservice::{BlobService, MemoryBlobService}, directoryservice::{DirectoryService, MemoryDirectoryService}, pathinfoservice::{MemoryPathInfoService, PathInfoService}, }; -pub fn gen_blob_service() -> Box<dyn BlobService> { - Box::new(MemoryBlobService::default()) +pub fn gen_blob_service() -> Arc<dyn BlobService> { + Arc::new(MemoryBlobService::default()) } -pub fn gen_directory_service() -> Box<dyn DirectoryService> { - Box::new(MemoryDirectoryService::default()) +pub fn gen_directory_service() -> Arc<dyn DirectoryService> { + Arc::new(MemoryDirectoryService::default()) } pub fn gen_pathinfo_service( - blob_service: Box<dyn BlobService>, - directory_service: Box<dyn DirectoryService>, + blob_service: Arc<dyn BlobService>, + directory_service: Arc<dyn DirectoryService>, ) -> impl PathInfoService { MemoryPathInfoService::new(blob_service, directory_service) } |