about summary refs log tree commit diff
diff options
context:
space:
mode:
authoredef <edef@edef.eu>2024-05-25T08·43+0000
committeredef <edef@edef.eu>2024-05-25T11·33+0000
commitedd93b19628e655c5903dd79393e6387b23b8168 (patch)
tree9656c3ccc604baf5c2607e560595e74b5c8b0330
parent49750fa1e7e307a323e22f4f0d98ad2dc88d78bf (diff)
fix(tvix/eval): drop superfluous string context check r/8168
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 <flokli@flokli.de>
Tested-by: BuildkiteCI
-rw-r--r--tvix/eval/src/value/string.rs5
1 files changed, 1 insertions, 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())),
         )
     }