diff options
Diffstat (limited to 'crates/shirabe/src/util')
| -rw-r--r-- | crates/shirabe/src/util/http/curl_downloader.rs | 17 | ||||
| -rw-r--r-- | crates/shirabe/src/util/perforce.rs | 8 |
2 files changed, 2 insertions, 23 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(()); } diff --git a/crates/shirabe/src/util/perforce.rs b/crates/shirabe/src/util/perforce.rs index 1f64dcc..937e305 100644 --- a/crates/shirabe/src/util/perforce.rs +++ b/crates/shirabe/src/util/perforce.rs @@ -682,13 +682,7 @@ impl Perforce { let res_array = explode(PHP_EOL, &result); for line in &res_array { let res_bits = explode(" ", line); - if count(&PhpMixed::List( - res_bits - .iter() - .map(|s| Box::new(PhpMixed::String(s.clone()))) - .collect(), - )) > 4 - { + if res_bits.len() > 4 { let branch = Preg::replace( r"/[^A-Za-z0-9 ]/", "", |
