Skip to content

Commit

Permalink
Rename to PatternsPackedV1
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Sep 24, 2024
1 parent 49ce950 commit cf6d717
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/datetime/src/provider/packed_pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub struct LengthPluralElements<T> {
pub short: PluralElements<T>,
}

/// A builder for a [`PackedSkeletonDataV2`].
/// A builder for a [`PatternsPackedV1`].
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PackedSkeletonDataBuilder<'a> {
/// Patterns always available.
Expand All @@ -40,7 +40,7 @@ pub struct PackedSkeletonDataBuilder<'a> {
pub variant1: Option<LengthPluralElements<Pattern<'a>>>,
}

size_test!(PackedSkeletonDataV2, packed_skeleton_data_size, 32);
size_test!(PatternsPackedV1, packed_skeleton_data_size, 32);

/// Main data struct for packed datetime patterns.
///
Expand Down Expand Up @@ -111,7 +111,7 @@ size_test!(PackedSkeletonDataV2, packed_skeleton_data_size, 32);
/// [`EraDisplay::Auto`]: crate::neo_skeleton::EraDisplay::Auto
#[doc = packed_skeleton_data_size!()]
#[derive(Debug, PartialEq, Eq, Clone)]
pub struct PackedSkeletonDataV2<'data> {
pub struct PatternsPackedV1<'data> {
/// An encoding of which standard/variant cell corresponds to which entry
/// in the patterns table. See class docs.
pub header: u32,
Expand All @@ -121,7 +121,7 @@ pub struct PackedSkeletonDataV2<'data> {

impl PackedSkeletonDataBuilder<'_> {
/// Builds a packed pattern representation from the builder.
pub fn build(mut self) -> PackedSkeletonDataV2<'static> {
pub fn build(mut self) -> PatternsPackedV1<'static> {
self.simplify();

// Initialize the elements vector with the standard patterns.
Expand Down Expand Up @@ -206,7 +206,7 @@ impl PackedSkeletonDataBuilder<'_> {
.map(|pattern| (pattern.metadata.to_four_bit_metadata(), &*pattern.items))
})
.collect::<Vec<_>>();
PackedSkeletonDataV2 {
PatternsPackedV1 {
#[allow(clippy::unwrap_used)] // the header fits in 21 bits
header: u32::try_from(header).unwrap(),
elements: VarZeroVec::from(&elements),
Expand All @@ -229,7 +229,7 @@ pub(crate) enum PackedSkeletonVariant {
Variant1,
}

impl PackedSkeletonDataV2<'_> {
impl PatternsPackedV1<'_> {
pub(crate) fn get(
&self,
length: NeoSkeletonLength,
Expand Down

0 comments on commit cf6d717

Please sign in to comment.