Skip to content

Commit

Permalink
use NonZeroU8
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian committed Jan 28, 2025
1 parent 588b867 commit 02e9e41
Show file tree
Hide file tree
Showing 71 changed files with 6,731 additions and 6,692 deletions.
6 changes: 3 additions & 3 deletions components/datetime/src/provider/time_zones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use alloc::borrow::Cow;
use icu_pattern::{DoublePlaceholderPattern, SinglePlaceholderPattern};
use icu_provider::prelude::*;
use zerovec::{ZeroMap, ZeroMap2d};
use zerovec::{ule::NichedOption, ZeroMap, ZeroMap2d};

use icu_timezone::{provider::IsoMinutesSinceEpoch, TimeZoneBcp47Id, ZoneVariant};

Expand Down Expand Up @@ -202,7 +202,7 @@ pub struct MetazoneSpecificNamesV1<'data> {
/// including in SemVer minor releases. While the serde representation of data structs is guaranteed
/// to be stable, their Rust representation might not be. Use with caution.
/// </div>
pub type MetazoneId = u8;
pub type MetazoneId = core::num::NonZeroU8;

/// An ICU4X mapping to the metazones at a given period.
/// See CLDR-JSON metaZones.json for more context.
Expand All @@ -226,5 +226,5 @@ pub struct MetazonePeriodV1<'data>(
/// The default mapping between period and metazone id. The second level key is a wall-clock time represented as
/// the number of minutes since the local [`EPOCH`](icu_timezone::provider::EPOCH). It represents when the metazone started to be used.
#[cfg_attr(feature = "serde", serde(borrow))]
pub ZeroMap2d<'data, TimeZoneBcp47Id, IsoMinutesSinceEpoch, Option<MetazoneId>>,
pub ZeroMap2d<'data, TimeZoneBcp47Id, IsoMinutesSinceEpoch, NichedOption<MetazoneId, 1>>,
);
382 changes: 191 additions & 191 deletions provider/data/datetime/data/metazone_generic_names_long_v1_marker.rs.data

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions provider/data/datetime/data/metazone_period_v1_marker.rs.data

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

988 changes: 494 additions & 494 deletions provider/data/datetime/fingerprints.csv

Large diffs are not rendered by default.

Large diffs are not rendered by default.

184 changes: 92 additions & 92 deletions provider/source/data/debug/time_zone/generic_long@1/ar-EG.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 02e9e41

Please sign in to comment.