mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 04:00:02 +00:00
Use newer format! syntax
This commit is contained in:
parent
bd562924a2
commit
6333fb0bd3
3 changed files with 20 additions and 42 deletions
|
@ -98,9 +98,9 @@ pub async fn fetch_crate_cratesio(
|
|||
|
||||
// Download crate to temporary dir (crates.io or git?)
|
||||
let crate_url = format!("https://crates.io/{}", version.dl_path);
|
||||
let tgz_path = temp_dir.join(format!("{}.tgz", name));
|
||||
let tgz_path = temp_dir.join(format!("{name}.tgz"));
|
||||
|
||||
debug!("Fetching crate from: {}", crate_url);
|
||||
debug!("Fetching crate from: {crate_url}");
|
||||
|
||||
// Download crate
|
||||
download(&crate_url, &tgz_path).await?;
|
||||
|
@ -108,7 +108,7 @@ pub async fn fetch_crate_cratesio(
|
|||
// Decompress downloaded tgz
|
||||
debug!("Decompressing crate archive");
|
||||
extract(&tgz_path, PkgFmt::Tgz, &temp_dir)?;
|
||||
let crate_path = temp_dir.join(format!("{}-{}", name, version_name));
|
||||
let crate_path = temp_dir.join(format!("{name}-{version_name}"));
|
||||
|
||||
// Return crate directory
|
||||
Ok(crate_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue