From e4a2679f550a6d821cfa211b36c6874f7c21210b Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Tue, 1 Oct 2024 22:22:03 -0400 Subject: [PATCH] Remove unnecessary Deserialize derives on settings --- crates/uv-settings/src/settings.rs | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/crates/uv-settings/src/settings.rs b/crates/uv-settings/src/settings.rs index 1cea301a8af51..7ce90d10a7cb2 100644 --- a/crates/uv-settings/src/settings.rs +++ b/crates/uv-settings/src/settings.rs @@ -110,7 +110,6 @@ impl Options { } /// Global settings, relevant to all invocations. -#[allow(dead_code)] #[derive(Debug, Clone, Default, Deserialize, CombineOptions, OptionsMetadata)] #[serde(rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] @@ -229,10 +228,7 @@ pub struct GlobalOptions { } /// Settings relevant to all installer operations. -#[allow(dead_code)] -#[derive(Debug, Clone, Default, Deserialize, CombineOptions)] -#[serde(rename_all = "kebab-case")] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug, Clone, Default, CombineOptions)] pub struct InstallerOptions { pub index_url: Option, pub extra_index_url: Option>, @@ -256,10 +252,7 @@ pub struct InstallerOptions { } /// Settings relevant to all resolver operations. -#[allow(dead_code)] -#[derive(Debug, Clone, Default, Deserialize, CombineOptions)] -#[serde(rename_all = "kebab-case")] -#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] +#[derive(Debug, Clone, Default, CombineOptions)] pub struct ResolverOptions { pub index_url: Option, pub extra_index_url: Option>, @@ -287,10 +280,7 @@ pub struct ResolverOptions { /// Shared settings, relevant to all operations that must resolve and install dependencies. The /// union of [`InstallerOptions`] and [`ResolverOptions`]. -#[allow(dead_code)] -#[derive( - Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize, CombineOptions, OptionsMetadata, -)] +#[derive(Debug, Clone, Default, PartialEq, Eq, Deserialize, CombineOptions, OptionsMetadata)] #[serde(rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))] pub struct ResolverInstallerOptions { @@ -624,7 +614,6 @@ pub struct ResolverInstallerOptions { /// /// These values will be ignored when running commands outside the `uv pip` namespace (e.g., /// `uv lock`, `uvx`). -#[allow(dead_code)] #[derive(Debug, Clone, Default, Deserialize, CombineOptions, OptionsMetadata)] #[serde(deny_unknown_fields, rename_all = "kebab-case")] #[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]