From 4cda236c0c4513e4be9668ede727a8aac5ba1223 Mon Sep 17 00:00:00 2001 From: Ryan Lahfa Date: Sat, 24 Dec 2022 18:18:26 +0100 Subject: feat(tvix/eval): implement From for Value Change-Id: I287282a195d6f752260242739332b2357791974a Reviewed-on: https://cl.tvl.fyi/c/depot/+/7625 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/value/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tvix') 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 for Value { } } +impl From for Value { + fn from(i: f64) -> Self { + Self::Float(i) + } +} + impl From for Value { fn from(path: PathBuf) -> Self { Self::Path(path) -- cgit 1.4.1