Update to toml_edit 0.22 (#11973)

# Objective
Do #11829, but without breaking CI.

## Solution
Update to `toml_edit` v0.22, replace the deprecated function with the
the newer equivalent.
This commit is contained in:
James Liu 2024-02-19 00:11:29 -08:00 committed by GitHub
parent 24e8e67b91
commit ac6a4ff386
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0"
keywords = ["bevy"]
[dependencies]
toml_edit = { version = "0.21", default-features = false, features = ["parse"] }
toml_edit = { version = "0.22", default-features = false, features = ["parse"] }
syn = "2.0"
quote = "1.0"
rustc-hash = "1.0"

View file

@ -7,7 +7,7 @@ publish = false
license = "MIT OR Apache-2.0"
[dependencies]
toml_edit = { version = "0.21", default-features = false, features = ["parse"] }
toml_edit = { version = "0.22", default-features = false, features = ["parse"] }
tera = "1.15"
serde = { version = "1.0", features = ["derive"] }
bitflags = "2.3"

View file

@ -65,7 +65,7 @@ fn parse_features(panic_on_missing: bool) -> Vec<Feature> {
.as_str()
.unwrap()
.to_string();
if let Some(description) = key.decor().prefix() {
if let Some(description) = key.leaf_decor().prefix() {
let description = description.as_str().unwrap().to_string();
if !description.starts_with("\n# ") || !description.ends_with('\n') {
panic!("Missing description for feature {name}");

View file

@ -10,5 +10,5 @@ license = "MIT OR Apache-2.0"
xshell = "0.2"
clap = { version = "4.0", features = ["derive"] }
ron = "0.8"
toml_edit = { version = "0.21", default-features = false, features = ["parse"] }
toml_edit = { version = "0.22", default-features = false, features = ["parse"] }
pbr = "1.1"