From d0d21550b9be229354f531ab426620a2100576fe Mon Sep 17 00:00:00 2001 From: jimmyfraiture Date: Sun, 7 Sep 2025 19:18:47 -0700 Subject: [PATCH] NIT windows --- codex-rs/core/src/unified_exec/path.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/codex-rs/core/src/unified_exec/path.rs b/codex-rs/core/src/unified_exec/path.rs index b3b765760b..d3bada3fd4 100644 --- a/codex-rs/core/src/unified_exec/path.rs +++ b/codex-rs/core/src/unified_exec/path.rs @@ -41,7 +41,7 @@ fn windows_split_command_line(input: &str) -> Option> { backslashes += 1; } '"' => { - current.extend(std::iter::repeat('\\').take(backslashes / 2)); + current.extend(std::iter::repeat_n('\\', backslashes / 2)); if backslashes % 2 == 0 { in_quotes = !in_quotes; } else { @@ -50,14 +50,14 @@ fn windows_split_command_line(input: &str) -> Option> { backslashes = 0; } c if c.is_whitespace() && !in_quotes => { - current.extend(std::iter::repeat('\\').take(backslashes)); + current.extend(std::iter::repeat_n('\\', backslashes)); backslashes = 0; if !current.is_empty() { args.push(std::mem::take(&mut current)); } } other => { - current.extend(std::iter::repeat('\\').take(backslashes)); + current.extend(std::iter::repeat_n('\\', backslashes)); backslashes = 0; current.push(other); } @@ -68,7 +68,7 @@ fn windows_split_command_line(input: &str) -> Option> { return None; } - current.extend(std::iter::repeat('\\').take(backslashes)); + current.extend(std::iter::repeat_n('\\', backslashes)); if !current.is_empty() { args.push(current); }