From efcf3e4230fb1127b98adb66ec1e264f9667a398 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 21:36:09 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Bolt:=20[performance=20improvement]?= =?UTF-8?q?=20optimize=20string=20concatenation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces intermediate vector allocation `.collect::>().join("")` with `.collect::()` when transforming `PascalCase` casing format, reducing redundant memory overhead. Co-authored-by: cloudesize67-cmd <237356855+cloudesize67-cmd@users.noreply.github.com> --- xdk-lib/src/casing.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xdk-lib/src/casing.rs b/xdk-lib/src/casing.rs index 6463487e..c897bee5 100644 --- a/xdk-lib/src/casing.rs +++ b/xdk-lib/src/casing.rs @@ -29,11 +29,8 @@ impl Casing { result } } - Casing::Pascal => words - .iter() - .map(|w| pascal_case(w)) - .collect::>() - .join(""), + // Bolt: Optimized string concatenation to avoid intermediate vector allocation + Casing::Pascal => words.iter().map(|w| pascal_case(w)).collect::(), Casing::Kebab => words.join("-").to_lowercase(), Casing::ScreamingSnake => words.join("_").to_uppercase(), }