From edd93b19628e655c5903dd79393e6387b23b8168 Mon Sep 17 00:00:00 2001 From: edef Date: Sat, 25 May 2024 08:43:58 +0000 Subject: fix(tvix/eval): drop superfluous string context check cl/11712 simultaneously introduced this check and made it unnecessary, since NixString::context should never return `Some` for empty contexts now. Change-Id: I41a655ff33910e8326cbb7d7526eb91bd19e9585 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11713 Reviewed-by: flokli Tested-by: BuildkiteCI --- tvix/eval/src/value/string.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tvix/eval/src/value/string.rs b/tvix/eval/src/value/string.rs index d0c7a254fb82..e3e92865f672 100644 --- a/tvix/eval/src/value/string.rs +++ b/tvix/eval/src/value/string.rs @@ -654,10 +654,7 @@ impl NixString { { Self::new( Self::from(new_contents).as_ref(), - other - .context() - .filter(|ctx| !ctx.is_empty()) - .map(|c| Box::new(c.clone())), + other.context().map(|c| Box::new(c.clone())), ) } -- cgit 1.4.1