about summary refs log tree commit diff
path: root/tvix/store
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store')
-rw-r--r--tvix/store/src/blobservice/memory.rs10
-rw-r--r--tvix/store/src/tests/utils.rs2
2 files changed, 2 insertions, 10 deletions
diff --git a/tvix/store/src/blobservice/memory.rs b/tvix/store/src/blobservice/memory.rs
index 73028f8f3c63..57c86551e4de 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<RwLock<HashMap<Vec<u8>, 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<Option<proto::BlobMeta>, Error> {
diff --git a/tvix/store/src/tests/utils.rs b/tvix/store/src/tests/utils.rs
index 0a4f5afb76e4..916e6516216c 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 {