From 1b38d79b814f9c3c22d9170fbbda3f20d7588ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Hatcher=20Andr=C3=A9s?= Date: Sat, 8 Nov 2025 08:53:50 +0100 Subject: [PATCH] FIX: Make clippy happy (#521) --- base/src/types.rs | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/base/src/types.rs b/base/src/types.rs index 07b41bc..a4c7729 100644 --- a/base/src/types.rs +++ b/base/src/types.rs @@ -445,11 +445,13 @@ impl Default for Fill { #[derive(Serialize, Deserialize, Encode, Decode, Debug, PartialEq, Eq, Clone)] #[serde(rename_all = "lowercase")] +#[derive(Default)] pub enum HorizontalAlignment { Center, CenterContinuous, Distributed, Fill, + #[default] General, Justify, Left, @@ -457,11 +459,6 @@ pub enum HorizontalAlignment { } // Note that alignment in "General" depends on type -impl Default for HorizontalAlignment { - fn default() -> Self { - Self::General - } -} impl HorizontalAlignment { fn is_default(&self) -> bool { @@ -487,7 +484,9 @@ impl Display for HorizontalAlignment { #[derive(Serialize, Deserialize, Encode, Decode, Debug, PartialEq, Eq, Clone)] #[serde(rename_all = "lowercase")] +#[derive(Default)] pub enum VerticalAlignment { + #[default] Bottom, Center, Distributed, @@ -501,12 +500,6 @@ impl VerticalAlignment { } } -impl Default for VerticalAlignment { - fn default() -> Self { - Self::Bottom - } -} - impl Display for VerticalAlignment { fn fmt(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { match self {