aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/repository/vcs/hg_driver.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/repository/vcs/hg_driver.rs')
-rw-r--r--crates/shirabe/src/repository/vcs/hg_driver.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/shirabe/src/repository/vcs/hg_driver.rs b/crates/shirabe/src/repository/vcs/hg_driver.rs
index 977d6b97..54341070 100644
--- a/crates/shirabe/src/repository/vcs/hg_driver.rs
+++ b/crates/shirabe/src/repository/vcs/hg_driver.rs
@@ -13,7 +13,8 @@ use chrono::{DateTime, FixedOffset, Utc};
use indexmap::IndexMap;
use shirabe_php_shim::Catch as _;
use shirabe_php_shim::{
- PhpMixed, RuntimeException, dirname, is_dir, is_writable, php_regex, preg_match, preg_replace,
+ PhpMixed, RuntimeException, dirname, is_dir, is_writable, php_regex, preg_is_match, preg_match,
+ preg_replace,
};
#[derive(Debug)]
@@ -305,14 +306,12 @@ impl HgDriver {
url: &str,
deep: bool,
) -> anyhow::Result<bool> {
- if preg_match(
+ if preg_is_match(
php_regex!(
r"#(^(?:https?|ssh)://(?:[^@]+@)?bitbucket.org|https://(?:.*?)\.kilnhg.com)#i"
),
url,
- )
- .is_some()
- {
+ ) {
return Ok(true);
}