about summary refs log tree commit diff
path: root/tvix/glue
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/glue')
-rw-r--r--tvix/glue/src/tvix_store_io.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/tvix/glue/src/tvix_store_io.rs b/tvix/glue/src/tvix_store_io.rs
index 0833fc45e132..b18e6633731d 100644
--- a/tvix/glue/src/tvix_store_io.rs
+++ b/tvix/glue/src/tvix_store_io.rs
@@ -561,16 +561,11 @@ impl EvalIO for TvixStoreIO {
                             async move { self.directory_service.as_ref().get(&digest).await }
                         })? {
                             let mut children: Vec<(bytes::Bytes, FileType)> = Vec::new();
-                            // TODO: into_nodes() to avoid cloning
-                            for (name, node) in directory.nodes() {
+                            for (name, node) in directory.into_nodes() {
                                 children.push(match node {
-                                    Node::Directory { .. } => {
-                                        (name.clone().into(), FileType::Directory)
-                                    }
+                                    Node::Directory { .. } => (name.into(), FileType::Directory),
                                     Node::File { .. } => (name.clone().into(), FileType::Regular),
-                                    Node::Symlink { .. } => {
-                                        (name.clone().into(), FileType::Symlink)
-                                    }
+                                    Node::Symlink { .. } => (name.into(), FileType::Symlink),
                                 })
                             }
                             Ok(children)