about summary refs log tree commit diff
path: root/tvix/eval/src/builtins/impure.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins/impure.rs')
-rw-r--r--tvix/eval/src/builtins/impure.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/tvix/eval/src/builtins/impure.rs b/tvix/eval/src/builtins/impure.rs
index e01c642e0a4f..26d1ba494575 100644
--- a/tvix/eval/src/builtins/impure.rs
+++ b/tvix/eval/src/builtins/impure.rs
@@ -38,8 +38,10 @@ mod impure_builtins {
         let dir = generators::request_read_dir(&co, path).await;
         let res = dir.into_iter().map(|(name, ftype)| {
             (
-                // TODO: propagate Vec<u8> into NixString.
-                NixString::from(String::from_utf8(name).expect("parsing file name as string")),
+                // TODO: propagate Vec<u8> or bytes::Bytes into NixString.
+                NixString::from(
+                    String::from_utf8(name.to_vec()).expect("parsing file name as string"),
+                ),
                 Value::String(
                     match ftype {
                         FileType::Directory => "directory",