diff options
Diffstat (limited to 'crates/shirabe/src/util/github.rs')
| -rw-r--r-- | crates/shirabe/src/util/github.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/crates/shirabe/src/util/github.rs b/crates/shirabe/src/util/github.rs index b7659572..9c22a2b3 100644 --- a/crates/shirabe/src/util/github.rs +++ b/crates/shirabe/src/util/github.rs @@ -8,7 +8,7 @@ use crate::io::io_interface; use crate::util::HttpDownloader; use crate::util::ProcessExecutor; use indexmap::IndexMap; -use shirabe_pcre::{CaptureKey, Preg, PregMatchedGroups}; +use shirabe_pcre::{CaptureKey, Preg}; use shirabe_php_shim::Catch as _; use shirabe_php_shim::{PhpMixed, date_local, in_array_loose, php_regex, stripos, strtolower}; @@ -325,12 +325,7 @@ impl GitHub { if stripos(header, "x-github-sso: required").is_none() { continue; } - let mut caps = PregMatchedGroups::new(); - if Preg::match3( - php_regex!(r"{\burl=(?P<url>[^\s;]+)}"), - header, - Some(&mut caps), - ) { + if let Some(caps) = Preg::match3(php_regex!(r"{\burl=(?P<url>[^\s;]+)}"), header) { return caps.get(&CaptureKey::ByName("url".to_string())).cloned(); } } |
