diff options
Diffstat (limited to 'tvix/store/src/pathinfoservice/lru.rs')
-rw-r--r-- | tvix/store/src/pathinfoservice/lru.rs | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tvix/store/src/pathinfoservice/lru.rs b/tvix/store/src/pathinfoservice/lru.rs index 3a7f01eb70ac..695c04636089 100644 --- a/tvix/store/src/pathinfoservice/lru.rs +++ b/tvix/store/src/pathinfoservice/lru.rs @@ -108,11 +108,17 @@ mod test { let mut p = PATHINFO_1.clone(); let root_node = p.node.as_mut().unwrap(); if let castorepb::Node { node: Some(node) } = root_node { - let n = node.to_owned(); - *node = (&tvix_castore::Node::try_from(&n) - .unwrap() - .rename("11111111111111111111111111111111-dummy2".into())) - .into(); + match node { + castorepb::node::Node::Directory(n) => { + n.name = "11111111111111111111111111111111-dummy2".into() + } + castorepb::node::Node::File(n) => { + n.name = "11111111111111111111111111111111-dummy2".into() + } + castorepb::node::Node::Symlink(n) => { + n.name = "11111111111111111111111111111111-dummy2".into() + } + } } else { unreachable!() } |