diff --git a/tvix/store/src/blobservice/memory.rs b/tvix/store/src/blobservice/memory.rs index 73028f8f3..57c86551e 100644 --- a/tvix/store/src/blobservice/memory.rs +++ b/tvix/store/src/blobservice/memory.rs @@ -9,19 +9,11 @@ use crate::{proto, Error}; use super::BlobService; -#[derive(Clone)] +#[derive(Clone, Default)] pub struct MemoryBlobService { db: Arc, proto::BlobMeta>>>, } -impl MemoryBlobService { - pub fn new() -> Self { - let db = Arc::new(RwLock::new(HashMap::default())); - - Self { db } - } -} - impl BlobService for MemoryBlobService { #[instrument(skip(self, req), fields(blob.digest=BASE64.encode(&req.digest)))] fn stat(&self, req: &proto::StatBlobRequest) -> Result, Error> { diff --git a/tvix/store/src/tests/utils.rs b/tvix/store/src/tests/utils.rs index 0a4f5afb7..916e65162 100644 --- a/tvix/store/src/tests/utils.rs +++ b/tvix/store/src/tests/utils.rs @@ -6,7 +6,7 @@ use crate::{ }; pub fn gen_blob_service() -> impl BlobService + Send + Sync + Clone + 'static { - MemoryBlobService::new() + MemoryBlobService::default() } pub fn gen_chunk_service() -> impl ChunkService + Clone {