diff --git a/ffi/capi/bindings/js/SentenceSegmenter.mjs b/ffi/capi/bindings/js/SentenceSegmenter.mjs index a4220726162..47c016ba00e 100644 --- a/ffi/capi/bindings/js/SentenceSegmenter.mjs +++ b/ffi/capi/bindings/js/SentenceSegmenter.mjs @@ -67,7 +67,7 @@ export class SentenceSegmenter { try { if (!diplomatReceive.resultFlag) { - const cause = DataError[Array.from(DataError.values.keys())[diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)]]; + const cause = new DataError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)); throw new globalThis.Error('DataError: ' + cause.value, { cause }); } return new SentenceSegmenter(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); diff --git a/ffi/capi/bindings/js/WordSegmenter.mjs b/ffi/capi/bindings/js/WordSegmenter.mjs index 41dd7a24e0c..3ade905de35 100644 --- a/ffi/capi/bindings/js/WordSegmenter.mjs +++ b/ffi/capi/bindings/js/WordSegmenter.mjs @@ -67,7 +67,7 @@ export class WordSegmenter { try { if (!diplomatReceive.resultFlag) { - const cause = DataError[Array.from(DataError.values.keys())[diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)]]; + const cause = new DataError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)); throw new globalThis.Error('DataError: ' + cause.value, { cause }); } return new WordSegmenter(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); @@ -103,7 +103,7 @@ export class WordSegmenter { try { if (!diplomatReceive.resultFlag) { - const cause = DataError[Array.from(DataError.values.keys())[diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)]]; + const cause = new DataError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)); throw new globalThis.Error('DataError: ' + cause.value, { cause }); } return new WordSegmenter(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); @@ -139,7 +139,7 @@ export class WordSegmenter { try { if (!diplomatReceive.resultFlag) { - const cause = DataError[Array.from(DataError.values.keys())[diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)]]; + const cause = new DataError(diplomatRuntime.internalConstructor, diplomatRuntime.enumDiscriminant(wasm, diplomatReceive.buffer)); throw new globalThis.Error('DataError: ' + cause.value, { cause }); } return new WordSegmenter(diplomatRuntime.internalConstructor, diplomatRuntime.ptrRead(wasm, diplomatReceive.buffer), []); diff --git a/provider/data/segmenter/data/sentence_break_data_override_v1_marker.rs.data b/provider/data/segmenter/data/sentence_break_data_override_v1_marker.rs.data index f7f2f501570..7505a648f68 100644 --- a/provider/data/segmenter/data/sentence_break_data_override_v1_marker.rs.data +++ b/provider/data/segmenter/data/sentence_break_data_override_v1_marker.rs.data @@ -12,13 +12,13 @@ #[macro_export] macro_rules! __impl_sentence_break_data_override_v1_marker { ($ provider : ty) => { - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl $provider { const DATA_SENTENCE_BREAK_DATA_OVERRIDE_V1_MARKER: icu_provider_baked::zerotrie::Data = icu_provider_baked::zerotrie::Data { trie: icu_provider_baked::zerotrie::ZeroTrieSimpleAscii { store: b"el\x80" }, values: &[icu::segmenter::provider::RuleBreakDataOverrideV1 { property_table_override: icu::collections::codepointtrie::CodePointTrie::from_parts(icu::collections::codepointtrie::CodePointTrieHeader { high_start: 1024u32, shifted12_high_start: 1u16, index3_null_offset: 32767u16, data_null_offset: 64u32, null_value: 0u32, trie_type: icu::collections::codepointtrie::TrieType::Small }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\0\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0B\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\r\0\0\0") }, 0u8) }] }; } - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { let mut metadata = icu_provider::DataResponseMetadata::default(); @@ -44,7 +44,7 @@ macro_rules! __impl_sentence_break_data_override_v1_marker { }; ($ provider : ty , DRY) => { __impl_sentence_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { icu_provider::DataProvider::::load(self, req).map(|r| r.metadata) @@ -53,7 +53,7 @@ macro_rules! __impl_sentence_break_data_override_v1_marker { }; ($ provider : ty , ITER) => { __impl_sentence_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(icu_provider_baked::DataStore::iter(&Self::DATA_SENTENCE_BREAK_DATA_OVERRIDE_V1_MARKER).collect()) @@ -62,13 +62,13 @@ macro_rules! __impl_sentence_break_data_override_v1_marker { }; ($ provider : ty , DRY , ITER) => { __impl_sentence_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { icu_provider::DataProvider::::load(self, req).map(|r| r.metadata) } } - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(icu_provider_baked::DataStore::iter(&Self::DATA_SENTENCE_BREAK_DATA_OVERRIDE_V1_MARKER).collect()) diff --git a/provider/data/segmenter/data/word_break_data_override_v1_marker.rs.data b/provider/data/segmenter/data/word_break_data_override_v1_marker.rs.data index 1c5e54d6d77..bd63a072432 100644 --- a/provider/data/segmenter/data/word_break_data_override_v1_marker.rs.data +++ b/provider/data/segmenter/data/word_break_data_override_v1_marker.rs.data @@ -12,13 +12,13 @@ #[macro_export] macro_rules! __impl_word_break_data_override_v1_marker { ($ provider : ty) => { - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl $provider { const DATA_WORD_BREAK_DATA_OVERRIDE_V1_MARKER: icu_provider_baked::zerotrie::Data = icu_provider_baked::zerotrie::Data { trie: icu_provider_baked::zerotrie::ZeroTrieSimpleAscii { store: b"\xC2fs\x02i\x80v\x80" }, values: &[icu::segmenter::provider::RuleBreakDataOverrideV1 { property_table_override: icu::collections::codepointtrie::CodePointTrie::from_parts(icu::collections::codepointtrie::CodePointTrieHeader { high_start: 65536u32, shifted12_high_start: 16u16, index3_null_offset: 1u16, data_null_offset: 64u32, null_value: 0u32, trie_type: icu::collections::codepointtrie::TrieType::Small }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\0\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0\x88\0\x90\0\x90\0\x91\0\0\0\x10\0 \x000\0@\0P\0`\0p\0@\0P\0`\0p\0@\0P\0`\0p\0@\0P\0`\0p\0@\0P\0`\0p\0@\0P\0`\0p\0@\0P\0`\0p\0@\0P\0`\0p\0@\0@\0@\0@\0@\x005\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\x000\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0@\0D\0H\0H\0H\0H\0H\0H\0H\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0\x01\0h\0") }, unsafe { zerovec::ZeroVec::from_bytes_unchecked(b"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x0E\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0") }, 0u8) }] }; } - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { let mut metadata = icu_provider::DataResponseMetadata::default(); @@ -44,7 +44,7 @@ macro_rules! __impl_word_break_data_override_v1_marker { }; ($ provider : ty , DRY) => { __impl_word_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { icu_provider::DataProvider::::load(self, req).map(|r| r.metadata) @@ -53,7 +53,7 @@ macro_rules! __impl_word_break_data_override_v1_marker { }; ($ provider : ty , ITER) => { __impl_word_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(icu_provider_baked::DataStore::iter(&Self::DATA_WORD_BREAK_DATA_OVERRIDE_V1_MARKER).collect()) @@ -62,13 +62,13 @@ macro_rules! __impl_word_break_data_override_v1_marker { }; ($ provider : ty , DRY , ITER) => { __impl_word_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { icu_provider::DataProvider::::load(self, req).map(|r| r.metadata) } } - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(icu_provider_baked::DataStore::iter(&Self::DATA_WORD_BREAK_DATA_OVERRIDE_V1_MARKER).collect()) diff --git a/provider/data/segmenter/stubdata/sentence_break_data_override_v1_marker.rs.data b/provider/data/segmenter/stubdata/sentence_break_data_override_v1_marker.rs.data index f4ca874490f..423ac64a5f7 100644 --- a/provider/data/segmenter/stubdata/sentence_break_data_override_v1_marker.rs.data +++ b/provider/data/segmenter/stubdata/sentence_break_data_override_v1_marker.rs.data @@ -6,9 +6,9 @@ #[macro_export] macro_rules! __impl_sentence_break_data_override_v1_marker { ($ provider : ty) => { - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)) @@ -17,7 +17,7 @@ macro_rules! __impl_sentence_break_data_override_v1_marker { }; ($ provider : ty , DRY) => { __impl_sentence_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)) @@ -26,7 +26,7 @@ macro_rules! __impl_sentence_break_data_override_v1_marker { }; ($ provider : ty , ITER) => { __impl_sentence_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(Default::default()) @@ -35,13 +35,13 @@ macro_rules! __impl_sentence_break_data_override_v1_marker { }; ($ provider : ty , DRY , ITER) => { __impl_sentence_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)) } } - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(Default::default()) diff --git a/provider/data/segmenter/stubdata/word_break_data_override_v1_marker.rs.data b/provider/data/segmenter/stubdata/word_break_data_override_v1_marker.rs.data index cab16837d34..05ee92dfd5e 100644 --- a/provider/data/segmenter/stubdata/word_break_data_override_v1_marker.rs.data +++ b/provider/data/segmenter/stubdata/word_break_data_override_v1_marker.rs.data @@ -6,9 +6,9 @@ #[macro_export] macro_rules! __impl_word_break_data_override_v1_marker { ($ provider : ty) => { - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] const _: () = <$provider>::MUST_USE_MAKE_PROVIDER_MACRO; - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DataProvider for $provider { fn load(&self, req: icu_provider::DataRequest) -> Result, icu_provider::DataError> { Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)) @@ -17,7 +17,7 @@ macro_rules! __impl_word_break_data_override_v1_marker { }; ($ provider : ty , DRY) => { __impl_word_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)) @@ -26,7 +26,7 @@ macro_rules! __impl_word_break_data_override_v1_marker { }; ($ provider : ty , ITER) => { __impl_word_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(Default::default()) @@ -35,13 +35,13 @@ macro_rules! __impl_word_break_data_override_v1_marker { }; ($ provider : ty , DRY , ITER) => { __impl_word_break_data_override_v1_marker!($provider); - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::DryDataProvider for $provider { fn dry_load(&self, req: icu_provider::DataRequest) -> Result { Err(icu_provider::DataErrorKind::IdentifierNotFound.with_req(::INFO, req)) } } - #[clippy::msrv = "1.70"] + #[clippy::msrv = "1.71.1"] impl icu_provider::IterableDataProvider for $provider { fn iter_ids(&self) -> Result>, icu_provider::DataError> { Ok(Default::default())