Skip to content

Commit

Permalink
Update to toml-span 0.3 (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle authored Jun 26, 2024
1 parent 5319763 commit 2a791e3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [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.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
6 changes: 3 additions & 3 deletions src/index/location.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2a791e3

Please sign in to comment.