mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-21 13:08:42 +00:00
Simplify fetch_crate_cratesio
: Rm unused param temp_dir
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
e39549f470
commit
24b1941c1a
2 changed files with 2 additions and 3 deletions
|
@ -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");
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue