Simplify fetch_crate_cratesio: Rm unused param temp_dir

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-06-12 17:09:17 +10:00
parent e39549f470
commit 24b1941c1a
No known key found for this signature in database
GPG key ID: 591C0B03040416D6
2 changed files with 2 additions and 3 deletions

View file

@ -1,4 +1,4 @@
use std::path::{Path, PathBuf};
use std::path::PathBuf;
use std::time::Duration;
use cargo_toml::Manifest;
@ -13,7 +13,6 @@ use crate::{helpers::*, BinstallError, Meta, TarBasedFmt};
pub async fn fetch_crate_cratesio(
name: &str,
version_req: &str,
temp_dir: &Path,
) -> Result<Manifest<Meta>, BinstallError> {
// Fetch / update index
debug!("Looking up crate information");

View file

@ -215,7 +215,7 @@ async fn entry() -> Result<()> {
debug!("Reading manifest: {}", manifest_path.display());
load_manifest_path(manifest_path.join("Cargo.toml"))?
}
None => fetch_crate_cratesio(&opts.name, &opts.version, temp_dir.path()).await?,
None => fetch_crate_cratesio(&opts.name, &opts.version).await?,
};
let package = manifest.package.unwrap();