diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-20 00:31:45 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-20 00:31:49 +0900 |
| commit | cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7 (patch) | |
| tree | 968f438437042e8092752aa521c2d7e6ae28307e /crates/shirabe/src/util/http | |
| parent | 7c5162e7c2f9d466e96248b7482aa98350244e8b (diff) | |
| download | php-shirabe-cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7.tar.gz php-shirabe-cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7.tar.zst php-shirabe-cac18ef73a39b4ac41fa4d6ccb753804d4c42cb7.zip | |
feat(php-shim): implement count()
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/http')
| -rw-r--r-- | crates/shirabe/src/util/http/curl_downloader.rs | 17 |
1 files changed, 1 insertions, 16 deletions
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(()); } |
