diff options
author | Vincent Ambo <mail@tazj.in> | 2022-08-10T14·34+0300 |
---|---|---|
committer | tazjin <tazjin@tvl.su> | 2022-08-24T18·19+0000 |
commit | c7ba2dec04c9c0bf7558285ed7d434e61ee5e5b5 (patch) | |
tree | c8551d50822d7c8f1cda78505c189f361449b9e3 /tvix/eval/src/value/string.rs | |
parent | 08b4d65fbd0ab1f5809aa2f6eb5da819d61299c4 (diff) |
test(tvix/value): add simple attrset construction tests r/4456
These do not yet test nested attribute sets; we need to add some more inspection primitives first. Change-Id: Icfc99bf17c73ebefc0d882a84f0ca73ec688a54d Reviewed-on: https://cl.tvl.fyi/c/depot/+/6110 Reviewed-by: eta <tvl@eta.st> Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value/string.rs')
-rw-r--r-- | tvix/eval/src/value/string.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs index 531bcf547b0b..d4776caea403 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -11,3 +11,9 @@ impl Display for NixString { f.write_str(self.0.as_str()) } } + +impl From<&str> for NixString { + fn from(s: &str) -> Self { + NixString(s.to_string()) + } +} |