about summary refs log tree commit diff
path: root/tvix/eval/src/value
diff options
context:
space:
mode:
authorJames Landrein <james.landrein@gmail.com>2022-10-17T21·37+0200
committerj4m3s <james.landrein@gmail.com>2022-10-25T08·46+0000
commit8425c2016c9a29008cdec8414fc647b8076a7e34 (patch)
tree1d11af3c83a0529ab44ceb925761779acb16c7fa /tvix/eval/src/value
parentbd0bf6ea7d64d2b3b453db4adb94c98c0b459a24 (diff)
feat(tvix/eval): add builtins.{floor,ceil} r/5198
Change-Id: I4e6c4f96f6f5097a5c637eb3dbbd7bb8b34b7d52
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7032
Autosubmit: j4m3s <james.landrein@gmail.com>
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Reviewed-by: grfn <grfn@gws.fyi>
Diffstat (limited to 'tvix/eval/src/value')
-rw-r--r--tvix/eval/src/value/mod.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index 82be292819ae..355540402d42 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -293,6 +293,7 @@ impl Value {
 
     gen_cast!(as_bool, bool, "bool", Value::Bool(b), *b);
     gen_cast!(as_int, i64, "int", Value::Integer(x), *x);
+    gen_cast!(as_float, f64, "float", Value::Float(x), *x);
     gen_cast!(to_str, NixString, "string", Value::String(s), s.clone());
     gen_cast!(to_attrs, Rc<NixAttrs>, "set", Value::Attrs(a), a.clone());
     gen_cast!(to_list, NixList, "list", Value::List(l), l.clone());