about summary refs log tree commit diff
path: root/tvix/castore/src/directoryservice/directory_graph.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/castore/src/directoryservice/directory_graph.rs')
-rw-r--r--tvix/castore/src/directoryservice/directory_graph.rs24
1 files changed, 11 insertions, 13 deletions
diff --git a/tvix/castore/src/directoryservice/directory_graph.rs b/tvix/castore/src/directoryservice/directory_graph.rs
index 33a03b263b81..54f3cb3e9353 100644
--- a/tvix/castore/src/directoryservice/directory_graph.rs
+++ b/tvix/castore/src/directoryservice/directory_graph.rs
@@ -276,23 +276,21 @@ impl ValidatedDirectoryGraph {
 mod tests {
     use crate::fixtures::{DIRECTORY_A, DIRECTORY_B, DIRECTORY_C};
     use crate::{Directory, Node};
-    use lazy_static::lazy_static;
     use rstest::rstest;
+    use std::sync::LazyLock;
 
     use super::{DirectoryGraph, LeavesToRootValidator, RootToLeavesValidator};
 
-    lazy_static! {
-        pub static ref BROKEN_PARENT_DIRECTORY: Directory =
-            Directory::try_from_iter([
-                (
-                    "foo".try_into().unwrap(),
-                    Node::Directory{
-                        digest: DIRECTORY_A.digest(),
-                        size: DIRECTORY_A.size() + 42, // wrong!
-                    }
-                )
-            ]).unwrap();
-    }
+    pub static BROKEN_PARENT_DIRECTORY: LazyLock<Directory> = LazyLock::new(|| {
+        Directory::try_from_iter([(
+            "foo".try_into().unwrap(),
+            Node::Directory {
+                digest: DIRECTORY_A.digest(),
+                size: DIRECTORY_A.size() + 42, // wrong!
+            },
+        )])
+        .unwrap()
+    });
 
     #[rstest]
     /// Uploading an empty directory should succeed.