Skip to content

Commit

Permalink
Thin out skeleton data (#5305)
Browse files Browse the repository at this point in the history
We only need 23 out of the 500 data structs for current tests.
  • Loading branch information
robertbastian authored Jul 25, 2024
1 parent 77632d8 commit ef33031
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 506 deletions.
18 changes: 9 additions & 9 deletions components/datetime/src/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ where
Ok(payload)
}

#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
mod private {
pub trait Sealed {}
}
Expand All @@ -628,7 +628,7 @@ mod private {
/// [`DynamicDataMarker`]. For example, this trait can be implemented for [`YearNamesV1Marker`].
///
/// This trait serves as a building block for a cross-calendar [`BoundDataProvider`].
#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
pub trait CalMarkers<M>: private::Sealed
where
M: DynamicDataMarker,
Expand Down Expand Up @@ -671,23 +671,23 @@ where

/// Implementation of [`CalMarkers`] that includes data for all calendars.
#[derive(Debug)]
#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
#[allow(clippy::exhaustive_enums)] // empty enum
pub enum FullDataCalMarkers {}

#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
impl private::Sealed for FullDataCalMarkers {}

/// Implementation of [`CalMarkers`] that includes data for no calendars.
#[derive(Debug)]
#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
#[allow(clippy::exhaustive_enums)] // empty enum
pub enum NoDataCalMarkers {}

#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
impl private::Sealed for NoDataCalMarkers {}

#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
impl<M> CalMarkers<M> for NoDataCalMarkers
where
M: DynamicDataMarker,
Expand Down Expand Up @@ -805,7 +805,7 @@ where
}
}

#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
macro_rules! impl_load_any_calendar {
([$(($erased:ident, $marker:ident)),+], [$($kind_cal:ident),+], [$($kind:ident => $cal:ident),+]) => {
impl_load_any_calendar!(@expand [$(($erased, $marker)),+], [$($kind_cal),+], [$($kind => $cal),+]);
Expand All @@ -825,7 +825,7 @@ macro_rules! impl_load_any_calendar {
};
}

#[cfg(any(feature = "datagen", feature = "experimental"))]
#[cfg(feature = "experimental")]
impl_load_any_calendar!([
(YearNamesV1Marker, YearNamesV1Marker),
(MonthNamesV1Marker, MonthNamesV1Marker),
Expand Down
Loading

0 comments on commit ef33031

Please sign in to comment.