diff --git a/Cargo.lock b/Cargo.lock index baac413..03bb774 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,40 +2,18 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - [[package]] name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.2.6" @@ -43,7 +21,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -52,12 +30,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "memchr" version = "2.7.2" @@ -130,14 +102,15 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.8.26" +version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578a7433b776b56a35785ed5ce9a7e777ac0598aac5a6dd1b4b18a307c7fc71b" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 1.9.3", + "indexmap", + "itoa", "ryu", "serde", - "yaml-rust", + "unsafe-libyaml", ] [[package]] @@ -178,7 +151,7 @@ version = "0.22.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e40bb779c5187258fd7aad0eb68cb8706a0a81fa712fbea808ab43c4b8374c4" dependencies = [ - "indexmap 2.2.6", + "indexmap", "serde", "serde_spanned", "toml_datetime", @@ -191,6 +164,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + [[package]] name = "valq" version = "0.1.0" @@ -208,12 +187,3 @@ checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ "memchr", ] - -[[package]] -name = "yaml-rust" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -dependencies = [ - "linked-hash-map", -] diff --git a/Cargo.toml b/Cargo.toml index 43fb8da..76227bd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,5 +13,5 @@ keywords = ["macro", "query", "extract", "json", "serde"] [dev-dependencies] serde_json = "1.0.68" -serde_yaml = "0.8.21" +serde_yaml = "0.9.34" toml = "0.8.12" diff --git a/src/lib.rs b/src/lib.rs index 42c79db..dd1fbb2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -475,7 +475,7 @@ mod tests { use super::query_value; use toml::{ from_str, - value::{Array, Map}, + value::{Array, Table}, Value, }; @@ -483,8 +483,8 @@ mod tests { let toml_str = include_str!("../res/sample.toml"); from_str(toml_str).unwrap() } - fn sample_table() -> Map { - Map::from_iter([ + fn sample_table() -> Table { + Table::from_iter([ ("first".to_string(), Value::String("zzz".to_string())), ("second".to_string(), Value::String("yyy".to_string())), ]) @@ -496,12 +496,12 @@ mod tests { .collect() } fn sample_arr_of_tables() -> Array { - let t1 = Map::from_iter([("hidden".to_string(), Value::String("tale".to_string()))]); - let t2 = Map::from_iter([ + let t1 = Table::from_iter([("hidden".to_string(), Value::String("tale".to_string()))]); + let t2 = Table::from_iter([ ("hoge".to_string(), Value::Integer(1)), ("fuga".to_string(), Value::Integer(2)), ]); - let t3 = Map::from_iter([( + let t3 = Table::from_iter([( "inner_arr".to_string(), Value::Array(vec![ Value::Integer(1),