mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 16:16:37 +00:00
Fix CI lint warnings
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
9efe39528f
commit
90670a6bc9
2 changed files with 5 additions and 8 deletions
|
@ -6,9 +6,7 @@ use semver::VersionReq;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
fetchers::{Data, Fetcher, SignaturePolicy, TargetDataErased},
|
fetchers::{Data, Fetcher, SignaturePolicy, TargetDataErased},
|
||||||
helpers::{
|
helpers::{gh_api_client::GhApiClient, jobserver_client::LazyJobserverClient, remote::Client},
|
||||||
self, gh_api_client::GhApiClient, jobserver_client::LazyJobserverClient, remote::Client,
|
|
||||||
},
|
|
||||||
manifests::cargo_toml_binstall::PkgOverride,
|
manifests::cargo_toml_binstall::PkgOverride,
|
||||||
registry::Registry,
|
registry::Registry,
|
||||||
DesiredTargets,
|
DesiredTargets,
|
||||||
|
@ -23,7 +21,7 @@ pub type Resolver =
|
||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
pub enum CargoTomlFetchOverride {
|
pub enum CargoTomlFetchOverride {
|
||||||
#[cfg(feature = "git")]
|
#[cfg(feature = "git")]
|
||||||
Git(helpers::git::GitUrl),
|
Git(crate::helpers::git::GitUrl),
|
||||||
Path(PathBuf),
|
Path(PathBuf),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@ use itertools::Itertools;
|
||||||
use leon::Template;
|
use leon::Template;
|
||||||
use maybe_owned::MaybeOwned;
|
use maybe_owned::MaybeOwned;
|
||||||
use semver::{Version, VersionReq};
|
use semver::{Version, VersionReq};
|
||||||
use tempfile::TempDir;
|
|
||||||
use tokio::task::spawn_blocking;
|
use tokio::task::spawn_blocking;
|
||||||
use tracing::{debug, error, info, instrument, warn};
|
use tracing::{debug, error, info, instrument, warn};
|
||||||
|
|
||||||
|
@ -21,7 +20,7 @@ use crate::{
|
||||||
errors::{BinstallError, VersionParseError},
|
errors::{BinstallError, VersionParseError},
|
||||||
fetchers::{Data, Fetcher, TargetData},
|
fetchers::{Data, Fetcher, TargetData},
|
||||||
helpers::{
|
helpers::{
|
||||||
self, cargo_toml::Manifest, cargo_toml_workspace::load_manifest_from_workspace,
|
cargo_toml::Manifest, cargo_toml_workspace::load_manifest_from_workspace,
|
||||||
download::ExtractedFiles, remote::Client, target_triple::TargetTriple,
|
download::ExtractedFiles, remote::Client, target_triple::TargetTriple,
|
||||||
tasks::AutoAbortJoinHandle,
|
tasks::AutoAbortJoinHandle,
|
||||||
},
|
},
|
||||||
|
@ -361,7 +360,7 @@ impl PackageInfo {
|
||||||
}
|
}
|
||||||
#[cfg(feature = "git")]
|
#[cfg(feature = "git")]
|
||||||
Some(Git(git_url)) => {
|
Some(Git(git_url)) => {
|
||||||
use helpers::git::{GitCancellationToken, Repository as GitRepository};
|
use crate::helpers::git::{GitCancellationToken, Repository as GitRepository};
|
||||||
|
|
||||||
let git_url = git_url.clone();
|
let git_url = git_url.clone();
|
||||||
let name = name.clone();
|
let name = name.clone();
|
||||||
|
@ -370,7 +369,7 @@ impl PackageInfo {
|
||||||
let cancel_on_drop = cancellation_token.clone().cancel_on_drop();
|
let cancel_on_drop = cancellation_token.clone().cancel_on_drop();
|
||||||
|
|
||||||
let ret = spawn_blocking(move || {
|
let ret = spawn_blocking(move || {
|
||||||
let dir = TempDir::new()?;
|
let dir = tempfile::TempDir::new()?;
|
||||||
GitRepository::shallow_clone(git_url, dir.as_ref(), Some(cancellation_token))?;
|
GitRepository::shallow_clone(git_url, dir.as_ref(), Some(cancellation_token))?;
|
||||||
|
|
||||||
load_manifest_from_workspace(dir.as_ref(), &name).map_err(BinstallError::from)
|
load_manifest_from_workspace(dir.as_ref(), &name).map_err(BinstallError::from)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue