Derive default

This commit is contained in:
Nate Butler
2025-01-29 11:35:35 -05:00
parent e8f9493632
commit edb86409fc

View File

@@ -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 {