From 1e1f49bfe53b41ac313f2963359e2bf8df2b8e86 Mon Sep 17 00:00:00 2001 From: konsti Date: Wed, 29 May 2024 11:30:21 +0200 Subject: [PATCH] Remove unnecessary `pub` in uv-build (#3900) Expose only `SourceBuild` and the error type from `uv-build`, all other types are internal. --- crates/uv-build/src/lib.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/uv-build/src/lib.rs b/crates/uv-build/src/lib.rs index 5771df224..8057eda86 100644 --- a/crates/uv-build/src/lib.rs +++ b/crates/uv-build/src/lib.rs @@ -118,7 +118,7 @@ pub enum Error { } #[derive(Debug)] -pub enum MissingLibrary { +enum MissingLibrary { Header(String), Linker(String), PythonPackage(String), @@ -213,11 +213,11 @@ impl Error { /// A `pyproject.toml` as specified in PEP 517. #[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "kebab-case")] -pub struct PyProjectToml { +struct PyProjectToml { /// Build-related data - pub build_system: Option, + build_system: Option, /// Project metadata - pub project: Option, + project: Option, } /// The `[project]` section of a pyproject.toml as specified in PEP 621. @@ -226,26 +226,26 @@ pub struct PyProjectToml { /// informing wheel builds. #[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "kebab-case")] -pub struct Project { +struct Project { /// The name of the project - pub name: PackageName, + name: PackageName, /// The version of the project as supported by PEP 440 - pub version: Option, + version: Option, /// Specifies which fields listed by PEP 621 were intentionally unspecified so another tool /// can/will provide such metadata dynamically. - pub dynamic: Option>, + dynamic: Option>, } /// The `[build-system]` section of a pyproject.toml as specified in PEP 517. #[derive(Deserialize, Debug, Clone, PartialEq, Eq)] #[serde(rename_all = "kebab-case")] -pub struct BuildSystem { +struct BuildSystem { /// PEP 508 dependencies required to execute the build system. - pub requires: Vec>, + requires: Vec>, /// A string naming a Python object that will be used to perform the build. - pub build_backend: Option, + build_backend: Option, /// Specify that their backend code is hosted in-tree, this key contains a list of directories. - pub backend_path: Option, + backend_path: Option, } impl BackendPath { @@ -256,7 +256,7 @@ impl BackendPath { } #[derive(Debug, Clone, PartialEq, Eq)] -pub struct BackendPath(Vec); +struct BackendPath(Vec); impl<'de> Deserialize<'de> for BackendPath { fn deserialize(deserializer: D) -> Result