From: Ryan Lahfa <tvl@lahfa•xyz>
To: depot@tazj.in
Cc: flokli@flokli•de, Ryan Lahfa <tvl@lahfa•xyz>
Subject: [PATCH 1/2] feat(tvix/eval): implement From<f64> for Value
Date: Sat, 24 Dec 2022 18:27:45 +0100 [thread overview]
Message-ID: <20221224172745.3104453-2-tvl@lahfa.xyz> (raw)
In-Reply-To: <20221224172745.3104453-1-tvl@lahfa.xyz>
---
tvix/eval/src/value/mod.rs | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tvix/eval/src/value/mod.rs b/tvix/eval/src/value/mod.rs
index 9aed486d4..124ce881d 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)
--
2.38.1
next prev parent reply other threads:[~2022-12-24 17:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 17:27 [PATCH 0/2] Implement serde::Deserialize " Ryan Lahfa
2022-12-24 17:27 ` Ryan Lahfa [this message]
2022-12-24 17:27 ` [PATCH 2/2] feat(tvix/eval): implement " Ryan Lahfa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221224172745.3104453-2-tvl@lahfa.xyz \
--to=tvl@lahfa$(echo .)xyz \
--cc=depot@tazj.in \
--cc=flokli@flokli$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://code.tvl.fyi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).