diff --git a/tools/src/publish.rs b/tools/src/publish.rs index 642017a0..5e43b4e2 100644 --- a/tools/src/publish.rs +++ b/tools/src/publish.rs @@ -5,7 +5,7 @@ use std::collections::HashMap; use std::fs; use std::path::{Path, PathBuf}; use std::process::Command; -use toml_edit::Document; +use toml_edit::DocumentMut; use crate::utils::*; @@ -149,10 +149,10 @@ fn get_agb_dependencies(folder: &Path) -> Result, Error> { Ok(result) } -fn read_cargo_toml(folder: &Path) -> Result { +fn read_cargo_toml(folder: &Path) -> Result { let cargo_toml_contents = fs::read_to_string(folder.join("Cargo.toml")).map_err(|_| Error::CargoToml)?; - let cargo_toml: Document = cargo_toml_contents.parse().map_err(|_| Error::CargoToml)?; + let cargo_toml: DocumentMut = cargo_toml_contents.parse().map_err(|_| Error::CargoToml)?; Ok(cargo_toml) } diff --git a/tools/src/release.rs b/tools/src/release.rs index 7c69a18f..29d945dc 100644 --- a/tools/src/release.rs +++ b/tools/src/release.rs @@ -98,7 +98,7 @@ fn update_to_version( let toml_file_content = std::fs::read_to_string(toml_file).map_err(|_| Error::ReadTomlFile)?; let mut cargo_toml = toml_file_content - .parse::() + .parse::() .map_err(|_| Error::InvalidToml(toml_file.to_string_lossy().into_owned()))?; let new_version = format!("{new_version}"); @@ -120,7 +120,7 @@ fn update_to_version( let toml_file_content = std::fs::read_to_string(&cargo_toml_file).map_err(|_| Error::ReadTomlFile)?; let mut cargo_toml = toml_file_content - .parse::() + .parse::() .map_err(|_| Error::InvalidToml(cargo_toml_file.to_string_lossy().into_owned()))?; if let Some(this_dep) = cargo_toml["dependencies"].get_mut(&project_name) {