diff options
author | sterni <sternenseemann@systemli.org> | 2022-09-20T10·51+0200 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2022-09-21T13·08+0000 |
commit | 834fe833e5dc1df6838cfa69c24a6f3b3c7a5c5b (patch) | |
tree | dc820a48acd4b34f9b5ae1a12dbc7f5ab83f2dfd /tvix/eval/src/builtins/mod.rs | |
parent | 6e6edcce6ac38bf2ca088a7efeb73f5db0bee8a6 (diff) |
fix(tvix/eval/versions): preserve the Number string exactly r/4947
This is relevant for builtins.splitVersion: nix-repl> builtins.splitVersion "unstable-2022-02-21" [ "unstable" "2022" "02" "21" ] Change-Id: I0a0add178d95d5a82e112b41ed5f3ca5a19608f8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6710 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/builtins/mod.rs')
-rw-r--r-- | tvix/eval/src/builtins/mod.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tvix/eval/src/builtins/mod.rs b/tvix/eval/src/builtins/mod.rs index 02457340dcd1..0b1fe540fed9 100644 --- a/tvix/eval/src/builtins/mod.rs +++ b/tvix/eval/src/builtins/mod.rs @@ -220,8 +220,7 @@ fn pure_builtins() -> Vec<Builtin> { let parts = s .map(|s| { Value::String(match s { - // TODO(sterni): we should avoid converting back and forth here - VersionPart::Number(n) => format!("{n}").into(), + VersionPart::Number(n) => n.into(), VersionPart::Word(w) => w.into(), }) }) |