Skip to content

Commit

Permalink
Remove manual Default impl for ListLength (unicode-org#4509)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Jan 6, 2024
1 parent 1ae5bb3 commit 39a01a4
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions components/list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}
}

0 comments on commit 39a01a4

Please sign in to comment.