diff --git a/components/list/src/lib.rs b/components/list/src/lib.rs index 0e6fd913a62..6875d6c144c 100644 --- a/components/list/src/lib.rs +++ b/components/list/src/lib.rs @@ -106,10 +106,11 @@ pub use ListError as Error; /// Represents the style of a list. See the /// [CLDR spec](https://unicode.org/reports/tr35/tr35-general.html#ListPatterns) /// for an explanation of the different styles. -#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)] +#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash, Default)] #[non_exhaustive] pub enum ListLength { /// A typical list + #[default] Wide, /// A shorter list Short, @@ -118,9 +119,3 @@ pub enum ListLength { // *Important*: When adding a variant here, make sure the code in // ListFormatterPatterns::{start, middle, end, pair} stays panic-free! } - -impl Default for ListLength { - fn default() -> Self { - Self::Wide - } -}