From 52b7a762681fb04ae9387c2f1951a36bf83ebc79 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 27 Feb 2023 13:44:06 +0300 Subject: chore(tvix/eval): remove `From 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 Tested-by: BuildkiteCI --- tvix/eval/src/value/string.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tvix/eval/src/value/string.rs') 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 for NixString { } } -impl From for NixString { - fn from(s: SmolStr) -> Self { - NixString(Box::from(s.as_str())) +impl From> for NixString { + fn from(s: Box) -> Self { + Self(s) } } -- cgit 1.4.1