refactor(tvix/eval): rm From<(T, Option<Box<NixContext>>)> for NixString
This conversion was a bit too magic, and we can just use `NixString::new_context_from` without having to worry about the distinction between an empty context or no context, as NixString::new_context_from already deals with that internally. Change-Id: I3e5d57ecfa0f7456aa6c526863e49f2523afaec3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12754 Tested-by: BuildkiteCI Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de>
This commit is contained in:
parent
1bc092b063
commit
2af30c8c7f
2 changed files with 1 additions and 20 deletions
|
|
@ -455,15 +455,6 @@ impl From<String> for NixString {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> From<(T, Option<Box<NixContext>>)> for NixString
|
||||
where
|
||||
NixString: From<T>,
|
||||
{
|
||||
fn from((s, ctx): (T, Option<Box<NixContext>>)) -> Self {
|
||||
Self::new(NixString::from(s).as_ref(), ctx)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Box<str>> for NixString {
|
||||
fn from(s: Box<str>) -> Self {
|
||||
s.into_boxed_bytes().into()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue