diff options
Diffstat (limited to 'crates/shirabe/src/command/config_command.rs')
| -rw-r--r-- | crates/shirabe/src/command/config_command.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/crates/shirabe/src/command/config_command.rs b/crates/shirabe/src/command/config_command.rs index 504a0f11..550ddf3c 100644 --- a/crates/shirabe/src/command/config_command.rs +++ b/crates/shirabe/src/command/config_command.rs @@ -18,7 +18,7 @@ use crate::util::Filesystem; use crate::util::Platform; use crate::util::Silencer; use indexmap::IndexMap; -use shirabe_pcre::{CaptureKey, Preg}; +use shirabe_pcre::{CaptureKey, Preg, PregMatchedGroups}; use shirabe_php_shim::{ InvalidArgumentException, PhpMixed, RuntimeException, array_is_list, array_merge, escapeshellcmd, exec, explode, file_exists, impl_php_class, implode, in_array_loose, @@ -701,7 +701,7 @@ impl Command for ConfigCommand { let mut source = config.borrow_mut().get_source_of_value(&setting_key); let mut value: PhpMixed; - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^repos?(?:itories)?(?:\\.(.+))?/"), &setting_key, @@ -929,7 +929,7 @@ impl Command for ConfigCommand { return Ok(0); } // handle preferred-install per-package config - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^preferred-install\\.(.+)/"), &setting_key, @@ -967,7 +967,7 @@ impl Command for ConfigCommand { } // handle allow-plugins config setting elements true or false to add/remove - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("{^allow-plugins\\.([a-zA-Z0-9/*-]+)}"), &setting_key, @@ -1037,7 +1037,7 @@ impl Command for ConfigCommand { } // handle repositories - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^repos?(?:itories)?\\.(.+)/"), &setting_key, @@ -1110,7 +1110,7 @@ impl Command for ConfigCommand { } // handle extra - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^extra\\.(.+)/"), &setting_key, @@ -1187,7 +1187,7 @@ impl Command for ConfigCommand { } // handle suggest - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^suggest\\.(.+)/"), &setting_key, @@ -1226,7 +1226,7 @@ impl Command for ConfigCommand { } // handle platform - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^platform\\.(.+)/"), &setting_key, @@ -1348,7 +1348,7 @@ impl Command for ConfigCommand { } // handle auth - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!( "/^(bitbucket-oauth|github-oauth|gitlab-oauth|gitlab-token|http-basic|custom-headers|bearer|forgejo-token)\\.(.+)/" @@ -1474,7 +1474,7 @@ impl Command for ConfigCommand { } // Check if the header is in correct "Name: Value" format - let mut header_parts: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut header_parts = PregMatchedGroups::new(); if !Preg::is_match3( php_regex!("/^[^:]+:\\s*.+$/"), header, @@ -1527,7 +1527,7 @@ impl Command for ConfigCommand { } // handle script - let mut matches: IndexMap<CaptureKey, String> = IndexMap::new(); + let mut matches = PregMatchedGroups::new(); if Preg::is_match3( php_regex!("/^scripts\\.(.+)/"), &setting_key, |
