From c50321a9fe03ef193e4deb523af9da3bd8208554 Mon Sep 17 00:00:00 2001 From: Francisco Noel <63328653+byfnoel@users.noreply.github.com> Date: Sun, 10 Aug 2025 11:26:44 -0400 Subject: [PATCH] Fix lifetime warning by explicitly telling the compiler to infer from context For context: ``` --> src/repositories/updater.rs:311:36 | | pub(crate) fn repository_name(url: &str) -> Option { | ^^^^ -------------- the same lifetime is hidden here | | | the lifetime is elided here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing ```` --- src/repositories/updater.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/repositories/updater.rs b/src/repositories/updater.rs index 534fa8af9..43d29acd0 100644 --- a/src/repositories/updater.rs +++ b/src/repositories/updater.rs @@ -308,7 +308,7 @@ impl RepositoryStatsUpdater { } } -pub(crate) fn repository_name(url: &str) -> Option { +pub(crate) fn repository_name(url: &str) -> Option> { static RE: LazyLock = LazyLock::new(|| { Regex::new(r"https?://(?P[^/]+)/(?P[\w\._/-]+)/(?P[\w\._-]+)").unwrap() });