about summary refs log tree commit diff
path: root/tvix/eval/src/builtins
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/eval/src/builtins')
-rw-r--r--tvix/eval/src/builtins/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs
index f9302deab84b..ead916377f94 100644
--- a/tvix/eval/src/builtins/mod.rs
+++ b/tvix/eval/src/builtins/mod.rs
@@ -951,7 +951,7 @@ mod pure_builtins {
             cmp::min(beg + (len as usize), x.as_str().len())
         };
 
-        Ok(Value::String(x.as_str()[beg..end].into()))
+        Ok(Value::String(x.as_bytes()[beg..end].try_into()?))
     }
 
     #[builtin("tail")]