Bump cargo_toml from 0.12.2 to 0.12.4 (#455)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
dependabot[bot] 2022-10-04 02:18:54 +13:00 committed by GitHub
parent 51fe4d59e3
commit 405e41eda4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 14 deletions

4
Cargo.lock generated
View file

@ -270,9 +270,9 @@ dependencies = [
[[package]]
name = "cargo_toml"
version = "0.12.2"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee685beed1fe2ab3cb9eb95d65727413b5e27f2b34014a3ea9c92053f8c230fc"
checksum = "6a621d5d6d6c8d086dbaf1fe659981da41a1b63c6bdbba30b4dbb592c6d3bd49"
dependencies = [
"serde",
"toml",

View file

@ -13,7 +13,7 @@ license = "GPL-3.0"
async-trait = "0.1.57"
bytes = "1.2.1"
bzip2 = "0.4.3"
cargo_toml = "0.12.2"
cargo_toml = "0.12.4"
compact_str = { version = "0.6.0", features = ["serde"] }
crates_io_api = { version = "0.8.1", default-features = false }
detect-targets = { version = "0.1.2", path = "../detect-targets" }

View file

@ -32,10 +32,10 @@ pub async fn install(
} => {
let current_version =
package
.version
.version()
.parse()
.map_err(|err| BinstallError::VersionParse {
v: package.version,
v: package.version().to_string(),
err,
})?;
let target = fetcher.target().into();
@ -65,7 +65,8 @@ pub async fn install(
} else {
info!(
"Dry-run: running `cargo install {} --version {} --target {target}`",
package.name, package.version
package.name,
package.version()
);
Ok(None)
}
@ -118,7 +119,7 @@ async fn install_from_source(
"Running `{} install {} --version {} --target {target}`",
cargo.to_string_lossy(),
package.name,
package.version
package.version()
);
let mut cmd = Command::new(cargo);
@ -126,7 +127,7 @@ async fn install_from_source(
cmd.arg("install")
.arg(&package.name)
.arg("--version")
.arg(&package.version)
.arg(package.version())
.arg("--target")
.arg(target);

View file

@ -156,8 +156,8 @@ async fn resolve_inner(
if let Some(curr_version) = curr_version {
let new_version =
Version::parse(&package.version).map_err(|err| BinstallError::VersionParse {
v: package.version.clone(),
Version::parse(package.version()).map_err(|err| BinstallError::VersionParse {
v: package.version().to_string(),
err,
})?;
@ -206,8 +206,8 @@ async fn resolve_inner(
Arc::new(Data {
name: package.name.clone(),
target: target.clone(),
version: package.version.clone(),
repo: package.repository.clone(),
version: package.version().to_string(),
repo: package.repository().map(ToString::to_string),
meta: target_meta,
})
})
@ -383,8 +383,8 @@ fn collect_bin_files(
let bin_data = bins::Data {
name: &package.name,
target: fetcher.target(),
version: &package.version,
repo: package.repository.as_deref(),
version: package.version(),
repo: package.repository(),
meta,
bin_path,
install_path,