aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/hg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/hg.rs')
-rw-r--r--crates/shirabe/src/util/hg.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/hg.rs b/crates/shirabe/src/util/hg.rs
index d9e58623..29d305f0 100644
--- a/crates/shirabe/src/util/hg.rs
+++ b/crates/shirabe/src/util/hg.rs
@@ -5,7 +5,7 @@ use crate::io::IOInterface;
use crate::io::IOInterfaceImmutable;
use crate::util::ProcessExecutor;
use crate::util::Url;
-use shirabe_pcre::{Preg, PregNamedGroups};
+use shirabe_pcre::Preg;
use shirabe_php_shim::{php_regex, rawurlencode};
use std::sync::OnceLock;
@@ -56,16 +56,14 @@ impl Hg {
}
// Try with the authentication information available
- let mut matches = PregNamedGroups::new();
let matched = Preg::is_match_named(
php_regex!(
r"{^(?P<proto>ssh|https?)://(?:(?P<user>[^:@]+)(?::(?P<pass>[^:@]+))?@)?(?P<host>[^/]+)(?P<path>/.*)?}mi"
),
&url,
- &mut matches,
);
- if matched
+ if let Some(matches) = matched
&& self
.io
.has_authentication(matches.get("host").map(|s| s.as_str()).unwrap_or(""))