@@ -16,6 +16,7 @@ use crate::provider::*;
16
16
use crate :: { code_point_set:: CodePointSetData , props:: GeneralCategoryGroup } ;
17
17
use core:: ops:: RangeInclusive ;
18
18
use icu_collections:: codepointtrie:: { CodePointMapRange , CodePointTrie , TrieValue } ;
19
+ use icu_provider:: marker:: ErasedMarker ;
19
20
use icu_provider:: prelude:: * ;
20
21
use zerovec:: ule:: UleError ;
21
22
@@ -25,7 +26,7 @@ use zerovec::ule::UleError;
25
26
/// [`CodePointMapDataBorrowed`].
26
27
#[ derive( Debug , Clone ) ]
27
28
pub struct CodePointMapData < T : TrieValue > {
28
- data : DataPayload < ErasedPropertyCodePointMapV1Marker < T > > ,
29
+ data : DataPayload < ErasedMarker < PropertyCodePointMapV1 < ' static , T > > > ,
29
30
}
30
31
31
32
impl < T : TrieValue > CodePointMapData < T > {
@@ -96,10 +97,8 @@ impl<T: TrieValue> CodePointMapData<T> {
96
97
P : TrieValue ,
97
98
{
98
99
self . data
99
- . try_map_project :: < ErasedPropertyCodePointMapV1Marker < P > , _ , _ > ( move |data, _| {
100
- data. try_into_converted ( )
101
- } )
102
- . map ( CodePointMapData :: from_data)
100
+ . try_map_project ( |data, _| data. try_into_converted ( ) )
101
+ . map ( CodePointMapData :: from_data :: < ErasedMarker < PropertyCodePointMapV1 < ' static , P > > > )
103
102
}
104
103
105
104
/// Construct a new one from loaded data
@@ -115,9 +114,9 @@ impl<T: TrieValue> CodePointMapData<T> {
115
114
/// Construct a new one an owned [`CodePointTrie`]
116
115
pub fn from_code_point_trie ( trie : CodePointTrie < ' static , T > ) -> Self {
117
116
let set = PropertyCodePointMapV1 :: from_code_point_trie ( trie) ;
118
- CodePointMapData :: from_data (
119
- DataPayload :: < ErasedPropertyCodePointMapV1Marker < T > > :: from_owned ( set ) ,
120
- )
117
+ CodePointMapData :: from_data ( DataPayload :: <
118
+ ErasedMarker < PropertyCodePointMapV1 < ' static , T > > ,
119
+ > :: from_owned ( set ) )
121
120
}
122
121
123
122
/// Convert this type to a [`CodePointTrie`] as a borrowed value.
0 commit comments