You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Segmenter cleanups, part 2 (reduce trait complexity) (#6417)
First set of followups after
#6409
This:
- Removes lifetimes and `?Sized` from the BreakType traits
- Coalesces the BreakType markers into a single set of RuleBreakTypeFoo
markers
- Makes LineBreakType depend on RuleBreakType
- Adds a new WordBreakType that depends on RuleBreakType
previously the wordbreaktype distinction was awkwardly handled by
`unreachable!()`s and trait impls; which meant it was not
straightforward to make WordBreak use RuleBreakType instead of
WordBreakType. Moving that required moving it to a function, but it
seemed to work well.
This does not intend to finalize the module structure, it's still doing
cleanups, I didn't wish to have these be blocked on module structure
decisions.
A cleanup I may make is to use a secondary type parameter on
RuleBReakIterator instead of a function pointer. It ought not matter,
though.
<!--
Thank you for your pull request to ICU4X!
Reminder: try to use [Conventional
Comments](https://conventionalcomments.org/) to make comments clearer.
Please see
https://github.com/unicode-org/icu4x/blob/main/CONTRIBUTING.md for
general
information on contributing to ICU4X.
-->
0 commit comments