about summary refs log tree commit diff
path: root/tvix/eval/src/value
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2023-02-27T10·44+0300
committertazjin <tazjin@tvl.su>2023-03-13T20·30+0000
commit52b7a762681fb04ae9387c2f1951a36bf83ebc79 (patch)
tree11432f1f1ea840424d19b308370be40516db3b7f /tvix/eval/src/value
parent1941082cbb4aa977bc5210516536efdbf96b927c (diff)
chore(tvix/eval): remove `From<SmolStr> for NixString` instance r/5968
No longer needed, and in some cases caused some extra work.

Change-Id: I64e8e7292573bdc92a9c7a8e470e33f8c526f311
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8152
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Diffstat (limited to 'tvix/eval/src/value')
-rw-r--r--tvix/eval/src/value/string.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs
index 8bb41a7825dd..7144ca360d15 100644
--- a/tvix/eval/src/value/string.rs
+++ b/tvix/eval/src/value/string.rs
@@ -4,7 +4,6 @@
 //! level, allowing us to shave off some memory overhead and only
 //! paying the cost when creating new strings.
 use rnix::ast;
-use smol_str::SmolStr;
 use std::ffi::OsStr;
 use std::hash::Hash;
 use std::ops::Deref;
@@ -50,9 +49,9 @@ impl From<String> for NixString {
     }
 }
 
-impl From<SmolStr> for NixString {
-    fn from(s: SmolStr) -> Self {
-        NixString(Box::from(s.as_str()))
+impl From<Box<str>> for NixString {
+    fn from(s: Box<str>) -> Self {
+        Self(s)
     }
 }