mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-14 14:46:37 +00:00
Fix Registry::url
Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com>
This commit is contained in:
parent
a356179804
commit
ce87169b26
1 changed files with 7 additions and 2 deletions
|
@ -202,10 +202,15 @@ impl Registry {
|
||||||
|
|
||||||
/// Get url of the regsitry
|
/// Get url of the regsitry
|
||||||
pub fn url(&self) -> impl fmt::Display + '_ {
|
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::Git(registry) => either::Left(registry.url()),
|
||||||
Registry::Sparse(registry) => either::Right(registry.url()),
|
Registry::Sparse(registry) => either::Right(registry.url()),
|
||||||
|
};
|
||||||
|
|
||||||
|
#[cfg(not(feature = "git"))]
|
||||||
|
match self {
|
||||||
|
Registry::Sparse(registry) => registry.url(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue