diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-05-20 08:33:49 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-05-20 08:33:57 +0900 |
| commit | f31b101ce1e921a026ba234b1f0a83b0392bc118 (patch) | |
| tree | b7ac2aa84d71ebd162cc21aeab0240e7e0544988 /crates/shirabe/src/util/url.rs | |
| parent | 5e31fa33c3b5cf726a57a063b8e7a070869250fe (diff) | |
| download | php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.tar.gz php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.tar.zst php-shirabe-f31b101ce1e921a026ba234b1f0a83b0392bc118.zip | |
fix(compile): fix all remaining compile errors
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util/url.rs')
| -rw-r--r-- | crates/shirabe/src/util/url.rs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crates/shirabe/src/util/url.rs b/crates/shirabe/src/util/url.rs index 7dc6e4f..9ee5dc9 100644 --- a/crates/shirabe/src/util/url.rs +++ b/crates/shirabe/src/util/url.rs @@ -131,7 +131,7 @@ impl Url { .as_string_opt() .map(|s| s.to_string()) .unwrap_or_default(); - if let Some(port) = parse_url(url, PHP_URL_PORT).as_i64_opt() { + if let Some(port) = parse_url(url, PHP_URL_PORT).as_int() { origin = format!("{}:{}", origin, port); } @@ -156,7 +156,14 @@ impl Url { true, ) { - for gitlab_domain in config.get("gitlab-domains").as_vec_string() { + let gitlab_domains: Vec<String> = match config.get("gitlab-domains") { + PhpMixed::List(list) => list + .iter() + .filter_map(|v| v.as_string().map(|s| s.to_string())) + .collect(), + _ => vec![], + }; + for gitlab_domain in gitlab_domains { if !gitlab_domain.is_empty() && gitlab_domain.starts_with(&origin) { return gitlab_domain; } |
