From ce924463e329e7da2fac76651cc44b495ea8e79a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 15 Sep 2026 08:16:34 +0000 Subject: [PATCH] Fix unnecessary clone in web module's render_html Co-authored-by: Tcode-Motion <188012755+Tcode-Motion@users.noreply.github.com> --- stdlib/src/web.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stdlib/src/web.rs b/stdlib/src/web.rs index 500b9235..2082edf0 100644 --- a/stdlib/src/web.rs +++ b/stdlib/src/web.rs @@ -576,12 +576,12 @@ impl StdlibRegistry { arity: 0, callback: |ctx, _args| { let env = ctx.global_env.borrow(); - let blocks = match env.lookup("_dsl_blocks") { - Ok(RuntimeValue::List { items, .. }) => items.borrow().clone(), + let items = match env.lookup("_dsl_blocks") { + Ok(RuntimeValue::List { items, .. }) => items, _ => return Ok(RuntimeValue::Str(String::new())), }; let mut html = String::new(); - for block in &blocks { + for block in &*items.borrow() { html.push_str(&dsl_to_html(block)); } Ok(RuntimeValue::Str(html))