about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRyan Lahfa <tvl@lahfa.xyz>2022-12-24T17·18+0100
committerraitobezarius <tvl@lahfa.xyz>2022-12-25T15·47+0000
commit4cda236c0c4513e4be9668ede727a8aac5ba1223 (patch)
treefdd03a21e8832e4ffb451763a5d60da3d1c72738
parent3b59f1edc145a625126b42d9420933c3d59e0728 (diff)
feat(tvix/eval): implement From<f64> for Value r/5484
Change-Id: I287282a195d6f752260242739332b2357791974a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7625
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
-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 9aed486d4272..124ce881d9a1 100644
--- a/tvix/eval/src/value/mod.rs
+++ b/tvix/eval/src/value/mod.rs
@@ -530,6 +530,12 @@ impl From<i64> for Value {
     }
 }
 
+impl From<f64> for Value {
+    fn from(i: f64) -> Self {
+        Self::Float(i)
+    }
+}
+
 impl From<PathBuf> for Value {
     fn from(path: PathBuf) -> Self {
         Self::Path(path)