unicode-org / icu4x

Solving i18n for client-side and resource-constrained environments.
https://icu4x.unicode.org
Other
1.38k stars 178 forks source link

Figure out how to implement DateTimeNames::try_with_pattern #5840

Closed sffc closed 3 days ago

sffc commented 3 days ago

Currently I have an experimental function signature that takes &mut self, even though it should not ever mutate. This is because internally it calls load_for_pattern with an empty data provider. I don't want to duplicate the code paths.

What should we do?

sffc commented 3 days ago

In #5838 I'm removing this function and replacing it with a docs example on how you can use EmptyDataProvider to get the same behavior.