mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 04:28:43 +00:00
Fixed compilation of cargo-binstall
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
6f194aa302
commit
2d980e454b
5 changed files with 16 additions and 5 deletions
|
@ -9,6 +9,7 @@ use binstalk::{
|
|||
fetchers::{Fetcher, GhCrateMeta, QuickInstall, SignaturePolicy},
|
||||
get_desired_targets,
|
||||
helpers::{
|
||||
cacher::HTTPCacher,
|
||||
gh_api_client::GhApiClient,
|
||||
jobserver_client::LazyJobserverClient,
|
||||
remote::{Certificate, Client},
|
||||
|
@ -157,6 +158,7 @@ pub fn install_crates(
|
|||
|
||||
client,
|
||||
gh_api_client,
|
||||
cacher: HTTPCacher::default(),
|
||||
jobserver_client,
|
||||
registry: if let Some(index) = args.index {
|
||||
index
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
||||
use std::{borrow::Cow, path::Path, sync::Arc};
|
||||
use std::{path::Path, sync::Arc};
|
||||
|
||||
use binstalk_downloader::{
|
||||
download::DownloadError, gh_api_client::GhApiError, remote::Error as RemoteError,
|
||||
|
|
|
@ -4,7 +4,7 @@ pub(crate) mod target_triple;
|
|||
pub mod tasks;
|
||||
|
||||
pub(crate) use binstalk_downloader::download;
|
||||
pub use binstalk_downloader::gh_api_client;
|
||||
pub use binstalk_downloader::{cacher, gh_api_client};
|
||||
|
||||
pub(crate) use cargo_toml_workspace::{self, cargo_toml};
|
||||
#[cfg(feature = "git")]
|
||||
|
|
|
@ -7,7 +7,8 @@ use semver::VersionReq;
|
|||
use crate::{
|
||||
fetchers::{Data, Fetcher, SignaturePolicy, TargetDataErased},
|
||||
helpers::{
|
||||
self, gh_api_client::GhApiClient, jobserver_client::LazyJobserverClient, remote::Client,
|
||||
self, cacher::HTTPCacher, gh_api_client::GhApiClient,
|
||||
jobserver_client::LazyJobserverClient, remote::Client,
|
||||
},
|
||||
manifests::cargo_toml_binstall::PkgOverride,
|
||||
registry::Registry,
|
||||
|
@ -16,8 +17,14 @@ use crate::{
|
|||
|
||||
pub mod resolve;
|
||||
|
||||
pub type Resolver =
|
||||
fn(Client, GhApiClient, Arc<Data>, Arc<TargetDataErased>, SignaturePolicy) -> Arc<dyn Fetcher>;
|
||||
pub type Resolver = fn(
|
||||
Client,
|
||||
GhApiClient,
|
||||
HTTPCacher,
|
||||
Arc<Data>,
|
||||
Arc<TargetDataErased>,
|
||||
SignaturePolicy,
|
||||
) -> Arc<dyn Fetcher>;
|
||||
|
||||
#[derive(Debug)]
|
||||
#[non_exhaustive]
|
||||
|
@ -50,6 +57,7 @@ pub struct Options {
|
|||
|
||||
pub client: Client,
|
||||
pub gh_api_client: GhApiClient,
|
||||
pub cacher: HTTPCacher,
|
||||
pub jobserver_client: LazyJobserverClient,
|
||||
pub registry: Registry,
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ async fn resolve_inner(
|
|||
let fetcher = f(
|
||||
opts.client.clone(),
|
||||
opts.gh_api_client.clone(),
|
||||
opts.cacher.clone(),
|
||||
data.clone(),
|
||||
target_data,
|
||||
opts.signature_policy,
|
||||
|
|
Loading…
Add table
Reference in a new issue