diff --git a/components/casemap/src/titlecase.rs b/components/casemap/src/titlecase.rs index 49f189dea4f..7c13c20bfef 100644 --- a/components/casemap/src/titlecase.rs +++ b/components/casemap/src/titlecase.rs @@ -7,9 +7,9 @@ use crate::provider::CaseMapV1Marker; use crate::CaseMapper; use alloc::string::String; use icu_locale_core::LanguageIdentifier; -use icu_properties::maps::CodePointMapData; +use icu_properties::props::{GeneralCategory, GeneralCategoryGroup}; use icu_properties::provider::GeneralCategoryV1Marker; -use icu_properties::{GeneralCategory, GeneralCategoryGroup}; +use icu_properties::CodePointMapData; use icu_provider::prelude::*; use writeable::Writeable; @@ -221,7 +221,8 @@ impl TitlecaseMapper { pub const fn new() -> Self { Self { cm: CaseMapper::new(), - gc: icu_properties::maps::general_category().static_to_owned(), + gc: icu_properties::CodePointMapData::::new() + .static_to_owned(), } } @@ -240,7 +241,7 @@ impl TitlecaseMapper { P: DataProvider + DataProvider + ?Sized, { let cm = CaseMapper::try_new_unstable(provider)?; - let gc = icu_properties::maps::load_general_category(provider)?; + let gc = icu_properties::CodePointMapData::::try_new_unstable(provider)?; Ok(Self { cm, gc }) } } @@ -266,7 +267,8 @@ impl> TitlecaseMapper { pub const fn new_with_mapper(casemapper: CM) -> Self { Self { cm: casemapper, - gc: icu_properties::maps::general_category().static_to_owned(), + gc: icu_properties::CodePointMapData::::new() + .static_to_owned(), } } @@ -276,7 +278,7 @@ impl> TitlecaseMapper { where P: DataProvider + DataProvider + ?Sized, { - let gc = icu_properties::maps::load_general_category(provider)?; + let gc = icu_properties::CodePointMapData::::try_new_unstable(provider)?; Ok(Self { cm: casemapper, gc }) } diff --git a/components/casemap/tests/gen_greek_to_me.rs b/components/casemap/tests/gen_greek_to_me.rs index 35ebfcc6c66..565dc1d196c 100644 --- a/components/casemap/tests/gen_greek_to_me.rs +++ b/components/casemap/tests/gen_greek_to_me.rs @@ -7,14 +7,17 @@ use icu_casemap::greek_to_me::{ }; use icu_casemap::CaseMapper; use icu_normalizer::DecomposingNormalizerBorrowed; -use icu_properties::{maps, GeneralCategoryGroup, Script}; +use icu_properties::{ + props::{GeneralCategory, GeneralCategoryGroup, Script}, + CodePointMapData, +}; use std::collections::BTreeMap; use std::fmt::Write; fn main() { let decomposer = DecomposingNormalizerBorrowed::new_nfd(); - let script = maps::script(); - let gc = maps::general_category(); + let script = CodePointMapData::