aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src')
-rw-r--r--crates/shirabe/src/command/init_command.rs4
-rw-r--r--crates/shirabe/src/downloader/git_downloader.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs
index 96bdc58d..b316e4fe 100644
--- a/crates/shirabe/src/command/init_command.rs
+++ b/crates/shirabe/src/command/init_command.rs
@@ -24,7 +24,7 @@ use shirabe_php_shim::{
CaptureKey, FILE_IGNORE_NEW_LINES, InvalidArgumentException, PHP_EOL, PHP_SERVER, PhpMixed,
array_flip_strings, array_intersect_key, array_map, basename, empty, explode, file,
file_exists, file_get_contents, file_put_contents, get_current_user, impl_php_class, implode,
- is_dir, is_string, php_regex, preg_match_all2, preg_match2, preg_quote, preg_replace, realpath,
+ is_dir, is_string, php_regex, preg_match_all, preg_match2, preg_quote, preg_replace, realpath,
str_replace, strpos, strtolower, trim, ucwords,
};
use shirabe_spdx_licenses::SpdxLicenses;
@@ -168,7 +168,7 @@ impl InitCommand {
) == 0
{
*self.git_config.borrow_mut() = Some(IndexMap::new());
- let m = preg_match_all2(php_regex!(r"{^([^=]+)=(.*)$}m"), &output);
+ let m = preg_match_all(php_regex!(r"{^([^=]+)=(.*)$}m"), &output);
if m.occurrence_count() > 0 {
let keys: Vec<Option<String>> =
m.get(&CaptureKey::ByIndex(1)).cloned().unwrap_or_default();
diff --git a/crates/shirabe/src/downloader/git_downloader.rs b/crates/shirabe/src/downloader/git_downloader.rs
index d3dea453..6e79576d 100644
--- a/crates/shirabe/src/downloader/git_downloader.rs
+++ b/crates/shirabe/src/downloader/git_downloader.rs
@@ -19,7 +19,7 @@ use crate::util::Url;
use indexmap::IndexMap;
use shirabe_php_shim::{
CaptureKey, CmpOp, PhpMixed, RuntimeException, array_map, basename, dirname, impl_php_class,
- implode, in_array_strict, is_dir, php_regex, preg_match_all2, preg_match2, preg_quote,
+ implode, in_array_strict, is_dir, php_regex, preg_match_all, preg_match2, preg_quote,
preg_replace, preg_split, realpath, rtrim, strlen, strpos, substr, trim, version_compare,
};
@@ -100,7 +100,7 @@ impl GitDownloader {
};
let head_ref = head_match.get(1).unwrap_or_default().to_string();
- let branches_match = preg_match_all2(
+ let branches_match = preg_match_all(
format!("{{^{} refs/heads/(.+)$}}mi", preg_quote(&head_ref, None)),
&refs,
);
@@ -127,7 +127,7 @@ impl GitDownloader {
// try to find matching branch names in remote repos
for candidate in &candidate_branches {
- let m = preg_match_all2(
+ let m = preg_match_all(
format!(
"{{^[a-f0-9]+ refs/remotes/((?:[^/]+)/{})$}}mi",
preg_quote(candidate, None)