From 26ebca4922af50950616ae262b4c758a9d905c62 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Wed, 26 Jun 2024 23:38:15 +0200 Subject: [PATCH 1/2] Update to toml-span 0.3 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- src/index/location.rs | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 70c94de..8a20d72 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2127,9 +2127,9 @@ dependencies = [ [[package]] name = "toml-span" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "369db38ce6d1fc320a54ea3f032d07c07a232ca19c40e287246aff06d57c2abe" +checksum = "ce0e1be49e3b9bf33d1a8077c081a3b7afcfc94e4bc1002c80376784381bc106" dependencies = [ "smallvec", ] diff --git a/Cargo.toml b/Cargo.toml index 25166a3..9b2a882 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ tokio = { version = "1.0", default-features = false, features = [ "time", ], optional = true } # cargo config parsing -toml-span = "0.2" +toml-span = "0.3" # Faster hashing twox-hash = { version = "1.6", default-features = false } diff --git a/src/index/location.rs b/src/index/location.rs index ed99763..82bf055 100644 --- a/src/index/location.rs +++ b/src/index/location.rs @@ -315,12 +315,12 @@ pub(crate) fn get_source_replacement<'iu>( let path = format!("/source/{registry_name}/replace-with"); let repw = config.pointer(&path)?.as_str()?; let sources = config.pointer("/source")?.as_table()?; - let replace_src = sources.get(&repw.into())?.as_table()?; + let replace_src = sources.get(repw)?.as_table()?; - if let Some(rr) = replace_src.get(&"registry".into()) { + if let Some(rr) = replace_src.get("registry") { rr.as_str() .map(|r| IndexUrl::NonCratesIo(r.to_owned().into())) - } else if let Some(rlr) = replace_src.get(&"local-registry".into()) { + } else if let Some(rlr) = replace_src.get("local-registry") { rlr.as_str() .map(|l| IndexUrl::Local(PathBuf::from(l).into())) } else { From bc764b422616266f1d6cd3917702425016051ab2 Mon Sep 17 00:00:00 2001 From: Jake Shadle Date: Wed, 26 Jun 2024 23:39:30 +0200 Subject: [PATCH 2/2] Update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b31cc4e..74a17b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - ReleaseDate +### Changed +- [PR#65](https://github.com/EmbarkStudios/tame-index/pull/65) updated `toml-span` -> 0.3.0. + ## [0.12.0] - 2024-05-24 ### Changed - [PR#64](https://github.com/EmbarkStudios/tame-index/pull/64) updated `gix` -> 0.63.