diff options
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 51b0f0345457..65022b6cc49c 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -46,6 +46,12 @@ impl From<String> for NixString { } } +impl From<SmolStr> for NixString { + fn from(s: SmolStr) -> Self { + NixString(StringRepr::Smol(s)) + } +} + impl Hash for NixString { fn hash<H: std::hash::Hasher>(&self, state: &mut H) { self.as_str().hash(state) |