Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/otap-dataflow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 4 additions & 4 deletions rust/otap-dataflow/xtask/src/structure_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down Expand Up @@ -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::<Value>()?;
let toml = contents.parse::<Table>()?;

if let Err(e) = check_package(cargo_toml_path.as_path(), &toml) {
errors.push(e);
Expand Down Expand Up @@ -132,7 +132,7 @@ fn check_path_is_true<P: AsRef<Path>>(

/// Checks the `package` section of a Cargo.toml file.
#[cfg(not(tarpaulin_include))]
fn check_package<P: AsRef<Path>>(cargo_toml_path: P, toml: &Value) -> anyhow::Result<()> {
fn check_package<P: AsRef<Path>>(cargo_toml_path: P, toml: &Table) -> anyhow::Result<()> {
let package = toml.get("package").ok_or_else(|| {
anyhow::anyhow!(
"❌ Missing `package` section in {}",
Expand Down Expand Up @@ -184,7 +184,7 @@ fn check_package<P: AsRef<Path>>(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<P: AsRef<Path>>(cargo_toml_path: P, toml: &Value) -> anyhow::Result<()> {
fn check_lints_workspace<P: AsRef<Path>>(cargo_toml_path: P, toml: &Table) -> anyhow::Result<()> {
let expected_lints = r#"Please add the following to your crate Cargo.toml:
[lints]
workspace = true
Expand Down
Loading