Skip to content

Commit

Permalink
fix deprecations from toml_edit
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Mar 11, 2024
1 parent 6399386 commit 2f2bfed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions crates/bevy_macro_utils/src/bevy_manifest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ extern crate proc_macro;

use proc_macro::TokenStream;
use std::{env, path::PathBuf};
use toml_edit::{Document, Item};
use toml_edit::{DocumentMut, Item};

/// The path to the `Cargo.toml` file for the Bevy project.
pub struct BevyManifest {
manifest: Document,
manifest: DocumentMut,
}

impl Default for BevyManifest {
Expand All @@ -25,7 +25,7 @@ impl Default for BevyManifest {
let manifest = std::fs::read_to_string(path.clone()).unwrap_or_else(|_| {
panic!("Unable to read cargo manifest: {}", path.display())
});
manifest.parse::<Document>().unwrap_or_else(|_| {
manifest.parse::<DocumentMut>().unwrap_or_else(|_| {
panic!("Failed to parse cargo manifest: {}", path.display())
})
})
Expand Down
4 changes: 3 additions & 1 deletion tools/example-showcase/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ workspace = true
xshell = "0.2"
clap = { version = "4.0", features = ["derive"] }
ron = "0.8"
toml_edit = { version = "0.22", default-features = false, features = ["parse"] }
toml_edit = { version = "0.22.7", default-features = false, features = [
"parse",
] }
pbr = "1.1"

0 comments on commit 2f2bfed

Please sign in to comment.