Skip to content

Commit

Permalink
Add Default and Hash to icu::list::ListLength (#4507)
Browse files Browse the repository at this point in the history
Same as #4503 and #4506 for icu::list
  • Loading branch information
zbraniecki authored Jan 4, 2024
1 parent fb4ef4b commit e8d80bf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/list/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ 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, Debug)]
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]
#[non_exhaustive]
pub enum ListLength {
/// A typical list
Expand All @@ -118,3 +118,9 @@ 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 e8d80bf

Please sign in to comment.