mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-08 21:20:01 +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
|
@ -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
Add a link
Reference in a new issue