From 73717f6f371a9026f24d35e8ba2e2dca31cbd3d5 Mon Sep 17 00:00:00 2001 From: Kavin <20838718+FireMasterK@users.noreply.github.com> Date: Sat, 25 Mar 2023 15:53:25 +0000 Subject: [PATCH] Remove unnecessary non-capturing groups. --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0695f7a..00ac5cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ async fn main() -> std::io::Result<()> { }.run().await } -static RE_DOMAIN: Lazy = Lazy::new(|| Regex::new(r"^(?:[a-z\d.-]*\.)?((?:[a-z\d-]*)\.(?:[a-z\d-]*))$").unwrap()); +static RE_DOMAIN: Lazy = Lazy::new(|| Regex::new(r"^(?:[a-z\d.-]*\.)?([a-z\d-]*\.[a-z\d-]*)$").unwrap()); static RE_MANIFEST: Lazy = Lazy::new(|| Regex::new("(?m)URI=\"([^\"]+)\"").unwrap()); static RE_DASH_MANIFEST: Lazy = Lazy::new(|| Regex::new("BaseURL>(https://[^<]+)