about summary refs log tree commit diff
path: root/tvix/store/src/pathinfoservice/memory.rs
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-05-10T11·01+0300
committerclbot <clbot@tvl.fyi>2024-05-11T13·55+0000
commit03af6ab72517c811f3a1143d13522e22823c3a05 (patch)
treef3396c9555afe01e3d540d0744f7d8072dc0ddc7 /tvix/store/src/pathinfoservice/memory.rs
parent14766cfe1d41495f1c5aaec297c0e87756f0ff31 (diff)
refactor(tvix/store/pathinfo/memory): drop {blob,directory}_service r/8104
These are not used anymore.

Change-Id: I6c16b4d80ddaabcb75fec3ea3e32b923b7719485
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11620
Tested-by: BuildkiteCI
Reviewed-by: Connor Brewster <cbrewster@hey.com>
Autosubmit: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/store/src/pathinfoservice/memory.rs')
-rw-r--r--tvix/store/src/pathinfoservice/memory.rs25
1 files changed, 3 insertions, 22 deletions
diff --git a/tvix/store/src/pathinfoservice/memory.rs b/tvix/store/src/pathinfoservice/memory.rs
index 25dd2f257cc6..203611b85443 100644
--- a/tvix/store/src/pathinfoservice/memory.rs
+++ b/tvix/store/src/pathinfoservice/memory.rs
@@ -7,33 +7,14 @@ use std::{
 };
 use tonic::async_trait;
 use tvix_castore::Error;
-use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService};
 
-pub struct MemoryPathInfoService<BS, DS> {
+#[derive(Default)]
+pub struct MemoryPathInfoService {
     db: Arc<RwLock<HashMap<[u8; 20], PathInfo>>>,
-
-    #[allow(dead_code)]
-    blob_service: BS,
-    #[allow(dead_code)]
-    directory_service: DS,
-}
-
-impl<BS, DS> MemoryPathInfoService<BS, DS> {
-    pub fn new(blob_service: BS, directory_service: DS) -> Self {
-        Self {
-            db: Default::default(),
-            blob_service,
-            directory_service,
-        }
-    }
 }
 
 #[async_trait]
-impl<BS, DS> PathInfoService for MemoryPathInfoService<BS, DS>
-where
-    BS: AsRef<dyn BlobService> + Send + Sync,
-    DS: AsRef<dyn DirectoryService> + Send + Sync,
-{
+impl PathInfoService for MemoryPathInfoService {
     async fn get(&self, digest: [u8; 20]) -> Result<Option<PathInfo>, Error> {
         let db = self.db.read().unwrap();