From cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 20 Jun 2026 00:31:45 +0900 Subject: feat(php-shim): implement count() Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/util/http/curl_downloader.rs | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'crates/shirabe/src/util/http') diff --git a/crates/shirabe/src/util/http/curl_downloader.rs b/crates/shirabe/src/util/http/curl_downloader.rs index 98f874a..3a47d4f 100644 --- a/crates/shirabe/src/util/http/curl_downloader.rs +++ b/crates/shirabe/src/util/http/curl_downloader.rs @@ -736,22 +736,7 @@ impl CurlDownloader { } pub fn tick(&mut self) -> anyhow::Result<()> { - if count(&PhpMixed::Array( - self.jobs - .iter() - .map(|(k, v)| { - ( - k.to_string(), - Box::new(PhpMixed::Array( - v.iter() - .map(|(k2, v2)| (k2.clone(), Box::new(v2.clone()))) - .collect(), - )), - ) - }) - .collect(), - )) == 0 - { + if self.jobs.is_empty() { return Ok(()); } -- cgit v1.3.1