From edb86409fcdaeed24eba7437c65791be35b87ae2 Mon Sep 17 00:00:00 2001 From: Nate Butler Date: Wed, 29 Jan 2025 11:35:35 -0500 Subject: [PATCH] Derive default --- crates/gpui/src/color.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/crates/gpui/src/color.rs b/crates/gpui/src/color.rs index cd75f5ec41..afade1bd02 100644 --- a/crates/gpui/src/color.rs +++ b/crates/gpui/src/color.rs @@ -549,21 +549,16 @@ impl<'de> Deserialize<'de> for Hsla { } /// The orientation of a background. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)] #[repr(C)] pub enum BackgroundOrientation { /// The background is oriented horizontally. + #[default] Horizontal = 0, /// The background is oriented vertically. Vertical = 1, } -impl Default for BackgroundOrientation { - fn default() -> Self { - BackgroundOrientation::Horizontal - } -} - impl Display for BackgroundOrientation { fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { match self {