From b79a15b45879bc7653b8f76cc7bee16946bd4e93 Mon Sep 17 00:00:00 2001 From: konsti Date: Mon, 6 Nov 2023 14:16:36 +0100 Subject: [PATCH] Update pyproject-toml to 0.8.0 (#329) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- crates/puffin-workspace/src/workspace.rs | 14 +------------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 32647be0b..56d7ca1b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2487,9 +2487,9 @@ dependencies = [ [[package]] name = "pyproject-toml" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "569e259cd132eb8cec5df8b672d187c5260f82ad352156b5da9549d4472e64b0" +checksum = "0774c13ff0b8b7ebb4791c050c497aefcfe3f6a222c0829c7017161ed38391ff" dependencies = [ "indexmap 2.0.2", "pep440_rs 0.3.12 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 943d3b24f..89fcfa341 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,7 +42,7 @@ once_cell = { version = "1.18.0" } petgraph = { version = "0.6.4" } platform-info = { version = "2.0.2" } plist = { version = "1.5.0" } -pyproject-toml = { version = "0.7.0" } +pyproject-toml = { version = "0.8.0" } rand = { version = "0.8.5" } rayon = { version = "1.8.0" } reflink-copy = { version = "0.1.10" } diff --git a/crates/puffin-workspace/src/workspace.rs b/crates/puffin-workspace/src/workspace.rs index 48bc5a81c..48098b4e3 100644 --- a/crates/puffin-workspace/src/workspace.rs +++ b/crates/puffin-workspace/src/workspace.rs @@ -3,8 +3,7 @@ use std::path::Path; use std::str::FromStr; use fs_err as fs; -use pyproject_toml::{BuildSystem, Project}; -use serde::{Deserialize, Serialize}; +use pyproject_toml::PyProjectToml; use toml_edit::Document; use pep508_rs::Requirement; @@ -14,17 +13,6 @@ use crate::toml::format_multiline_array; use crate::verbatim::VerbatimRequirement; use crate::WorkspaceError; -/// Unlike [`pyproject_toml::PyProjectToml`], in our case `build_system` is also optional -#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)] -#[serde(rename_all = "kebab-case")] -struct PyProjectToml { - /// Build-related data - build_system: Option, - - /// Project metadata - project: Option, -} - #[derive(Debug)] pub struct Workspace { /// The parsed `pyproject.toml`.