S001: first build compiles; fix 5 compile errors in place

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
astar76 2026-11-11 17:27:07 -06:00
commit d2bb67f4ea

View file

@ -121,7 +121,7 @@ pub fn pattern_to_regex(pattern: &str) -> String {
}
let mut out = String::from("^");
let (scheme, rest) = pattern.split_once("://").unwrap_or(("*", pattern));
out.push_str(if scheme == "*" { "https?" } else { &escape_regex(scheme) });
out.push_str(&if scheme == "*" { "https?".to_owned() } else { escape_regex(scheme) });
out.push_str(":\\/\\/");
let (host, path) = match rest.find('/') {
Some(i) => (&rest[..i], &rest[i..]),