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>2023-03-10T11·19+0100
committerclbot <clbot@tvl.fyi>2023-03-10T12·13+0000
commit8e97c0deb056dfe29feff9aefcc524c0f2f36355 (patch)
tree43159b06b199b8e5a653472510aef1302331511a /tvix/store/src/pathinfoservice/memory.rs
parent510927e43a950e727c31e100f1e88f0d8a80b6b9 (diff)
refactor(tvix/store): impl Default for MemoryPathInfoService r/5940
Change-Id: I07f83f8aaa6312cc37ce7e7ee2b713e60df23782
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8234
Autosubmit: flokli <flokli@flokli.de>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/store/src/pathinfoservice/memory.rs')
-rw-r--r--tvix/store/src/pathinfoservice/memory.rs9
1 files changed, 1 insertions, 8 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,