From 5685f7c59402439af33f7b6fc1114557f0c33477 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 10 Aug 2022 19:09:27 +0300 Subject: fix(tvix/value): add ident_str representation of strings When printing strings as identifiers (in attribute sets), the string should only be quoted and escaped if it contains escape characters. Change-Id: If2bcfa1e93dc8f00be4d7a57ec1d82fc679103c3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6127 Tested-by: BuildkiteCI Reviewed-by: grfn Autosubmit: tazjin --- tvix/eval/src/value/attrs.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tvix/eval/src/value/attrs.rs') diff --git a/tvix/eval/src/value/attrs.rs b/tvix/eval/src/value/attrs.rs index 7e3b5f231d66..d04e01bf7eab 100644 --- a/tvix/eval/src/value/attrs.rs +++ b/tvix/eval/src/value/attrs.rs @@ -37,7 +37,7 @@ impl Display for NixAttrs { NixAttrs::Map(map) => { for (name, value) in map { - f.write_fmt(format_args!("{} = {}; ", name, value))?; + f.write_fmt(format_args!("{} = {}; ", name.ident_str(), value))?; } } -- cgit 1.4.1