Skip to content

Commit

Permalink
Audit exhaustiveness of icu_calendar::types
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jan 10, 2025
1 parent d43d5d5 commit da29332
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions components/calendar/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl FormattingEra {
}

/// Year information for a year that is specified with an era
#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Default)]
#[non_exhaustive]
pub struct EraYear {
/// The era code as used in formatting. This era code is not necessarily unique for the calendar, and
Expand All @@ -202,7 +202,7 @@ pub struct EraYear {
}

/// Year information for a year that is specified as a cyclic year
#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Default)]
#[non_exhaustive]
pub struct CyclicYear {
/// The year in the cycle.
Expand Down Expand Up @@ -316,7 +316,7 @@ impl fmt::Display for MonthCode {

/// Representation of a formattable month.
#[derive(Copy, Clone, Debug, PartialEq)]
#[allow(clippy::exhaustive_structs)] // this type is stable
#[non_exhaustive]
pub struct MonthInfo {
/// The month number in this given year. For calendars with leap months, all months after
/// the leap month will end up with an incremented number.
Expand Down Expand Up @@ -355,9 +355,10 @@ impl MonthInfo {
self.standard_code.parsed().map(|(_, l)| l).unwrap_or(false)
}
}

/// A struct containing various details about the position of the day within a year. It is returned
// by the [`day_of_year_info()`](trait.DateInput.html#tymethod.day_of_year_info) method of the
// [`DateInput`] trait.
/// by the [`day_of_year_info()`](trait.DateInput.html#tymethod.day_of_year_info) method of the
/// [`DateInput`] trait.
#[derive(Copy, Clone, Debug, PartialEq)]
#[allow(clippy::exhaustive_structs)] // this type is stable
pub struct DayOfYearInfo {
Expand Down

0 comments on commit da29332

Please sign in to comment.