-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #107673 - lukas-code:update-icu4x, r=davidtwco
update ICU4X to 1.1.0 This patch updates the ICU4X crates to version 1.1.0 and regenerates the static data for `rustc_baked_icu_data`. This is mostly an internal and bugfix update. It notably includes unicode-org/icu4x#2834 to fix the future compatibility warning for [`BYTE_SLICE_IN_PACKED_STRUCT_WITH_DERIVE`](#107457). [full changelog](https://github.com/unicode-org/icu4x/blob/icu%401.1.0/CHANGELOG.md)
- Loading branch information
Showing
27 changed files
with
2,734 additions
and
2,303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,2 @@ | ||
// @generated | ||
impl AnyProvider for BakedDataProvider { | ||
fn load_any(&self, key: DataKey, req: DataRequest) -> Result<AnyResponse, DataError> { | ||
const ANDLISTV1MARKER: ::icu_provider::DataKeyHash = | ||
::icu_list::provider::AndListV1Marker::KEY.hashed(); | ||
const COLLATIONFALLBACKSUPPLEMENTV1MARKER: ::icu_provider::DataKeyHash = | ||
::icu_provider_adapters::fallback::provider::CollationFallbackSupplementV1Marker::KEY | ||
.hashed(); | ||
const LOCALEFALLBACKLIKELYSUBTAGSV1MARKER: ::icu_provider::DataKeyHash = | ||
::icu_provider_adapters::fallback::provider::LocaleFallbackLikelySubtagsV1Marker::KEY | ||
.hashed(); | ||
const LOCALEFALLBACKPARENTSV1MARKER: ::icu_provider::DataKeyHash = | ||
::icu_provider_adapters::fallback::provider::LocaleFallbackParentsV1Marker::KEY | ||
.hashed(); | ||
#[allow(clippy::match_single_binding)] | ||
match key.hashed() { | ||
ANDLISTV1MARKER => list::and_v1::DATA | ||
.get_by(|k| req.locale.strict_cmp(k.as_bytes()).reverse()) | ||
.copied() | ||
.map(AnyPayload::from_static_ref) | ||
.ok_or(DataErrorKind::MissingLocale), | ||
COLLATIONFALLBACKSUPPLEMENTV1MARKER => fallback::supplement::co_v1::DATA | ||
.get_by(|k| req.locale.strict_cmp(k.as_bytes()).reverse()) | ||
.copied() | ||
.map(AnyPayload::from_static_ref) | ||
.ok_or(DataErrorKind::MissingLocale), | ||
LOCALEFALLBACKLIKELYSUBTAGSV1MARKER => fallback::likelysubtags_v1::DATA | ||
.get_by(|k| req.locale.strict_cmp(k.as_bytes()).reverse()) | ||
.copied() | ||
.map(AnyPayload::from_static_ref) | ||
.ok_or(DataErrorKind::MissingLocale), | ||
LOCALEFALLBACKPARENTSV1MARKER => fallback::parents_v1::DATA | ||
.get_by(|k| req.locale.strict_cmp(k.as_bytes()).reverse()) | ||
.copied() | ||
.map(AnyPayload::from_static_ref) | ||
.ok_or(DataErrorKind::MissingLocale), | ||
_ => Err(DataErrorKind::MissingDataKey), | ||
} | ||
.map_err(|e| e.with_req(key, req)) | ||
.map(|payload| AnyResponse { payload: Some(payload), metadata: Default::default() }) | ||
} | ||
} | ||
impl_any_provider!(BakedDataProvider); |
Oops, something went wrong.