chore(tvix/eval): remove From<SmolStr> for NixString instance
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
This commit is contained in:
parent
1941082cbb
commit
52b7a76268
3 changed files with 12 additions and 14 deletions
|
|
@ -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(),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue