From 9e5bb3e4253dda96345f4d1a3421077a72295048 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 15 Aug 2026 09:10:16 +0900 Subject: refactor(php-shim): take only the data argument in http_build_query `http_build_query` ignores `numeric_prefix` because a string-keyed slice never holds an integer key, and every caller passes `"&"` as the separator. Drop both parameters and hard-code the separator. Callers that pass a map of scalar literals to `http_build_query_mixed` no longer need to build an `IndexMap` for it, so move them to the slice form. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe-php-shim/src/url.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'crates/shirabe-php-shim/src') diff --git a/crates/shirabe-php-shim/src/url.rs b/crates/shirabe-php-shim/src/url.rs index 27463ce0..c2ac725d 100644 --- a/crates/shirabe-php-shim/src/url.rs +++ b/crates/shirabe-php-shim/src/url.rs @@ -95,14 +95,8 @@ pub fn http_build_query_mixed( encode_pairs(&pairs, arg_separator) } -pub fn http_build_query( - data: &[(&str, &str)], - numeric_prefix: &str, - arg_separator: &str, -) -> String { - // numeric_prefix only applies to integer keys, which a string-keyed slice never has. - let _ = numeric_prefix; - encode_pairs(data, arg_separator) +pub fn http_build_query(data: &[(&str, &str)]) -> String { + encode_pairs(data, "&") } fn encode_pairs(pairs: T, arg_separator: &str) -> String { -- cgit v1.3.1-4-g156e