about summary refs log tree commit diff
path: root/tvix/eval/src/builtins
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/builtins
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/builtins')
-rw-r--r--tvix/eval/src/builtins/impure.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/tvix/eval/src/builtins/impure.rs b/tvix/eval/src/builtins/impure.rs
index f4bf400338ee..adf43e1a2ea9 100644
--- a/tvix/eval/src/builtins/impure.rs
+++ b/tvix/eval/src/builtins/impure.rs
@@ -1,6 +1,5 @@
 use builtin_macros::builtins;
 use genawaiter::rc::Gen;
-use smol_str::SmolStr;
 
 use std::{
     env,
@@ -12,7 +11,7 @@ use crate::{
     io::FileType,
     value::NixAttrs,
     vm::generators::{self, GenCo},
-    Value,
+    NixString, Value,
 };
 
 #[builtins]
@@ -38,14 +37,14 @@ mod impure_builtins {
         let dir = generators::request_read_dir(&co, path).await;
         let res = dir.into_iter().map(|(name, ftype)| {
             (
-                name,
+                NixString::from(name.as_str()),
                 Value::String(
-                    SmolStr::new(match ftype {
+                    match ftype {
                         FileType::Directory => "directory",
                         FileType::Regular => "regular",
                         FileType::Symlink => "symlink",
                         FileType::Unknown => "unknown",
-                    })
+                    }
                     .into(),
                 ),
             )