aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/vcs_repository.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository/vcs_repository.rs')
-rw-r--r--crates/shirabe/src/repository/vcs_repository.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/crates/shirabe/src/repository/vcs_repository.rs b/crates/shirabe/src/repository/vcs_repository.rs
index c8790f81..521d7aea 100644
--- a/crates/shirabe/src/repository/vcs_repository.rs
+++ b/crates/shirabe/src/repository/vcs_repository.rs
@@ -29,7 +29,7 @@ use crate::util::Url;
use indexmap::IndexMap;
use shirabe_external_packages::composer::pcre::Preg;
use shirabe_php_shim::{
- InvalidArgumentException, PhpClass, PhpMixed, in_array_strict, php_regex, str_replace, strpos,
+ InvalidArgumentException, PhpClass, PhpMixed, php_regex, str_replace, strpos,
};
use shirabe_semver::constraint::SimpleConstraint;
@@ -1030,10 +1030,7 @@ impl VcsRepository {
}
fn should_rethrow_transport_exception(&self, e: &TransportException) -> bool {
- in_array_strict(
- e.get_code(),
- &[PhpMixed::Int(401), PhpMixed::Int(403), PhpMixed::Int(429)],
- ) || e.get_code() >= 500
+ matches!(e.get_code(), 401 | 403 | 429) || e.get_code() >= 500
}
}