From 8425c2016c9a29008cdec8414fc647b8076a7e34 Mon Sep 17 00:00:00 2001 From: James Landrein Date: Mon, 17 Oct 2022 23:37:47 +0200 Subject: feat(tvix/eval): add builtins.{floor,ceil} Change-Id: I4e6c4f96f6f5097a5c637eb3dbbd7bb8b34b7d52 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7032 Autosubmit: j4m3s Tested-by: BuildkiteCI Reviewed-by: tazjin Reviewed-by: grfn --- tvix/eval/src/value/mod.rs | 1 + 1 file changed, 1 insertion(+) (limited to 'tvix/eval/src/value') 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, "set", Value::Attrs(a), a.clone()); gen_cast!(to_list, NixList, "list", Value::List(l), l.clone()); -- cgit 1.4.1