about summary refs log tree commit diff
path: root/tvix
diff options
context:
space:
mode:
Diffstat (limited to 'tvix')
-rw-r--r--tvix/store/src/pathinfoservice/memory.rs9
-rw-r--r--tvix/store/src/tests/utils.rs2
2 files changed, 2 insertions, 9 deletions
diff --git a/tvix/store/src/pathinfoservice/memory.rs b/tvix/store/src/pathinfoservice/memory.rs
index db31a2d7718c..4ac21883823b 100644
--- a/tvix/store/src/pathinfoservice/memory.rs
+++ b/tvix/store/src/pathinfoservice/memory.rs
@@ -8,18 +8,11 @@ use nix_compat::store_path::DIGEST_SIZE;
 
 use super::PathInfoService;
 
+#[derive(Default)]
 pub struct MemoryPathInfoService {
     db: Arc<RwLock<HashMap<Vec<u8>, proto::PathInfo>>>,
 }
 
-impl MemoryPathInfoService {
-    pub fn new() -> Self {
-        let db = Arc::new(RwLock::new(HashMap::default()));
-
-        Self { db }
-    }
-}
-
 impl PathInfoService for MemoryPathInfoService {
     fn get(
         &self,
diff --git a/tvix/store/src/tests/utils.rs b/tvix/store/src/tests/utils.rs
index ac801b47aad2..0b4a85a3af65 100644
--- a/tvix/store/src/tests/utils.rs
+++ b/tvix/store/src/tests/utils.rs
@@ -18,5 +18,5 @@ pub fn gen_directory_service() -> impl DirectoryService + Send + Sync + Clone +
 }
 
 pub fn gen_pathinfo_service() -> impl PathInfoService {
-    MemoryPathInfoService::new()
+    MemoryPathInfoService::default()
 }