mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-07 12:40:04 +00:00
Refactor: Impl Source::cratesio_registry
Makes initializing `metafiles::CrateVersionSource` more readable and improves performance since the parsing is now cached. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
3961dbb84a
commit
5bdffd9178
2 changed files with 11 additions and 3 deletions
|
@ -650,9 +650,7 @@ async fn install_from_package(
|
|||
let cvs = metafiles::CrateVersionSource {
|
||||
name: name.clone(),
|
||||
version: package.version.parse().into_diagnostic()?,
|
||||
source: metafiles::Source::Registry(
|
||||
url::Url::parse("https://github.com/rust-lang/crates.io-index").unwrap(),
|
||||
),
|
||||
source: metafiles::Source::cratesio_registry(),
|
||||
};
|
||||
|
||||
info!("Installing binaries...");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue