about summary refs log tree commit diff
path: root/tvix/eval/src/value/mod.rs
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-09-06T20·56-0700
committerwpcarro <wpcarro@gmail.com>2022-10-10T19·36+0000
commit41ddc37725a59b4af0f7043a7fd66b3fe48f935d (patch)
tree09cc3a4b6456546697d0d28f91f80be74b75ce00 /tvix/eval/src/value/mod.rs
parent899fbdbddb93050f26236ff7c72e7ae4704d497b (diff)
feat(tvix/eval): Support builtins.readDir r/5083
Co-authored-by: Griffin Smith <root@gws.fyi>
Change-Id: I5ff19efbe87d8f571f22ab0480500505afa624c5
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6552
Autosubmit: wpcarro <wpcarro@gmail.com>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value/mod.rs')
-rw-r--r--tvix/eval/src/value/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index d3b981b78cba..0f3b9cbbf4a2 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -371,6 +371,12 @@ impl From<i64> for Value {
     }
 }
 
+impl From<&str> for Value {
+    fn from(val: &str) -> Self {
+        Self::String(val.into())
+    }
+}
+
 fn type_error(expected: &'static str, actual: &Value) -> ErrorKind {
     ErrorKind::TypeError {
         expected,