mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-06-17 08:06:38 +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::{
|
||||
fetchers::{Data, Fetcher, SignaturePolicy, TargetDataErased},
|
||||
helpers::{
|
||||
self, gh_api_client::GhApiClient, jobserver_client::LazyJobserverClient, remote::Client,
|
||||
},
|
||||
helpers::{gh_api_client::GhApiClient, jobserver_client::LazyJobserverClient, remote::Client},
|
||||
manifests::cargo_toml_binstall::PkgOverride,
|
||||
registry::Registry,
|
||||
DesiredTargets,
|
||||
|
@ -23,7 +21,7 @@ pub type Resolver =
|
|||
#[non_exhaustive]
|
||||
pub enum CargoTomlFetchOverride {
|
||||
#[cfg(feature = "git")]
|
||||
Git(helpers::git::GitUrl),
|
||||
Git(crate::helpers::git::GitUrl),
|
||||
Path(PathBuf),
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ use itertools::Itertools;
|
|||
use leon::Template;
|
||||
use maybe_owned::MaybeOwned;
|
||||
use semver::{Version, VersionReq};
|
||||
use tempfile::TempDir;
|
||||
use tokio::task::spawn_blocking;
|
||||
use tracing::{debug, error, info, instrument, warn};
|
||||
|
||||
|
@ -21,7 +20,7 @@ use crate::{
|
|||
errors::{BinstallError, VersionParseError},
|
||||
fetchers::{Data, Fetcher, TargetData},
|
||||
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,
|
||||
tasks::AutoAbortJoinHandle,
|
||||
},
|
||||
|
@ -361,7 +360,7 @@ impl PackageInfo {
|
|||
}
|
||||
#[cfg(feature = "git")]
|
||||
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 name = name.clone();
|
||||
|
@ -370,7 +369,7 @@ impl PackageInfo {
|
|||
let cancel_on_drop = cancellation_token.clone().cancel_on_drop();
|
||||
|
||||
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))?;
|
||||
|
||||
load_manifest_from_workspace(dir.as_ref(), &name).map_err(BinstallError::from)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue