From 90670a6bc9345c4d3067f48a44874205ec21a558 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Sun, 5 May 2024 23:54:23 +1000 Subject: [PATCH] Fix CI lint warnings Signed-off-by: Jiahao XU --- crates/binstalk/src/ops.rs | 6 ++---- crates/binstalk/src/ops/resolve.rs | 7 +++---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/crates/binstalk/src/ops.rs b/crates/binstalk/src/ops.rs index 2124c14e..66366be6 100644 --- a/crates/binstalk/src/ops.rs +++ b/crates/binstalk/src/ops.rs @@ -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), } diff --git a/crates/binstalk/src/ops/resolve.rs b/crates/binstalk/src/ops/resolve.rs index 994bc6fd..0fa65d9b 100644 --- a/crates/binstalk/src/ops/resolve.rs +++ b/crates/binstalk/src/ops/resolve.rs @@ -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)