diff --git a/rust/otap-dataflow/Cargo.toml b/rust/otap-dataflow/Cargo.toml index e919ce0a5a..b56dfd95e5 100644 --- a/rust/otap-dataflow/Cargo.toml +++ b/rust/otap-dataflow/Cargo.toml @@ -228,7 +228,7 @@ otap-df-telemetry-macros = { path = 'crates/telemetry-macros' } prost-build = "0.14" ratatui = "0.30" testcontainers = "0.27" -toml = "0.8.22" +toml = "1.0.0" tonic-prost-build = "0.14" urlencoding = "2" geneva-uploader = "0.4.0" diff --git a/rust/otap-dataflow/xtask/src/structure_check.rs b/rust/otap-dataflow/xtask/src/structure_check.rs index e66f5482c7..5a6f7cb7fe 100644 --- a/rust/otap-dataflow/xtask/src/structure_check.rs +++ b/rust/otap-dataflow/xtask/src/structure_check.rs @@ -6,7 +6,7 @@ use std::path::Path; use anyhow::Error; -use toml::Value; +use toml::{Table, Value}; /// Validates the entire structure of the project. /// @@ -47,7 +47,7 @@ pub fn run() -> anyhow::Result<()> { match std::fs::read_to_string(cargo_toml_path.clone()) { Ok(contents) => { - let toml = contents.parse::()?; + let toml = contents.parse::()?; if let Err(e) = check_package(cargo_toml_path.as_path(), &toml) { errors.push(e); @@ -132,7 +132,7 @@ fn check_path_is_true>( /// Checks the `package` section of a Cargo.toml file. #[cfg(not(tarpaulin_include))] -fn check_package>(cargo_toml_path: P, toml: &Value) -> anyhow::Result<()> { +fn check_package>(cargo_toml_path: P, toml: &Table) -> anyhow::Result<()> { let package = toml.get("package").ok_or_else(|| { anyhow::anyhow!( "❌ Missing `package` section in {}", @@ -184,7 +184,7 @@ fn check_package>(cargo_toml_path: P, toml: &Value) -> anyhow::Re /// Checks the `lints` section of a Cargo.toml file. #[cfg(not(tarpaulin_include))] -fn check_lints_workspace>(cargo_toml_path: P, toml: &Value) -> anyhow::Result<()> { +fn check_lints_workspace>(cargo_toml_path: P, toml: &Table) -> anyhow::Result<()> { let expected_lints = r#"Please add the following to your crate Cargo.toml: [lints] workspace = true