mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-10 22:10:03 +00:00
Create new type LazyJobserverClient
and use it to replace `jobserver::Client`. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
a1d7a7c117
commit
3981400ebb
3 changed files with 33 additions and 19 deletions
|
@ -12,7 +12,7 @@ pub async fn install(
|
|||
resolution: Resolution,
|
||||
opts: Arc<Options>,
|
||||
desired_targets: DesiredTargets,
|
||||
jobserver_client: jobserver::Client,
|
||||
jobserver_client: LazyJobserverClient,
|
||||
) -> Result<()> {
|
||||
match resolution {
|
||||
Resolution::Fetch {
|
||||
|
@ -140,8 +140,10 @@ async fn install_from_package(
|
|||
async fn install_from_source(
|
||||
package: Package<Meta>,
|
||||
target: &str,
|
||||
jobserver_client: jobserver::Client,
|
||||
lazy_jobserver_client: LazyJobserverClient,
|
||||
) -> Result<()> {
|
||||
let jobserver_client = lazy_jobserver_client.get().await?;
|
||||
|
||||
debug!(
|
||||
"Running `cargo install {} --version {} --target {target}`",
|
||||
package.name, package.version
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue