From ce87169b26e98f35ee45f0d29fee285d151aecae Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Wed, 4 Jun 2025 00:34:57 +1000 Subject: [PATCH] Fix Registry::url Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- crates/binstalk-registry/src/lib.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/binstalk-registry/src/lib.rs b/crates/binstalk-registry/src/lib.rs index 39febc5a..8e98692b 100644 --- a/crates/binstalk-registry/src/lib.rs +++ b/crates/binstalk-registry/src/lib.rs @@ -202,10 +202,15 @@ impl Registry { /// Get url of the regsitry pub fn url(&self) -> impl fmt::Display + '_ { - match self { - #[cfg(feature = "git")] + #[cfg(feature = "git")] + return match self { Registry::Git(registry) => either::Left(registry.url()), Registry::Sparse(registry) => either::Right(registry.url()), + }; + + #[cfg(not(feature = "git"))] + match self { + Registry::Sparse(registry) => registry.url(), } }