Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove implicit LocaleFallbackProvider constructors #5183

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

robertbastian
Copy link
Member

@robertbastian robertbastian commented Jul 4, 2024

Now that LocaleFallbacker is an explicit argument to ExportDriver, it might make sense to always make it explicit on the LocaleFallbackProvider as well.

The _unstable, _with_buffer_provider, and _with_any_provider constructors are a bit odd for this crate anyway, no other adapter has the constructor trinity. Removing them also has the added benefit of removing the serde feature from the crate.

@robertbastian robertbastian force-pushed the fallbackctor branch 3 times, most recently from bd6050e to 66f4b31 Compare July 5, 2024 10:46
@robertbastian robertbastian marked this pull request as ready for review July 8, 2024 19:21
@robertbastian robertbastian requested review from sffc, Manishearth and a team as code owners July 8, 2024 19:21
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a positive change since it brings LocaleFallbackProvider and ExportDriver more into alignment.

Struct,
compact
)]
pub fn enable_locale_fallback(&mut self) -> Result<(), ICU4XDataError> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure we want to bring the change to FFI since the alternative may be less efficient (an extra allocation and FFI call), but it seems like something we could add back later if needed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fewer mutable methods over FFI is better anyway

@robertbastian robertbastian merged commit 60eca99 into unicode-org:main Jul 9, 2024
28 checks passed
@robertbastian robertbastian deleted the fallbackctor branch July 9, 2024 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants