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

Use Option<T> over FFI #5485

Merged
merged 3 commits into from
Sep 5, 2024
Merged

Conversation

Manishearth
Copy link
Member

No description provided.

ffi/capi/src/decimal.rs Outdated Show resolved Hide resolved
ffi/capi/src/decimal.rs Outdated Show resolved Hide resolved
@Manishearth Manishearth force-pushed the ffi-option branch 3 times, most recently from 9daa508 to faa1dd9 Compare September 4, 2024 21:38
@Manishearth Manishearth marked this pull request as ready for review September 4, 2024 21:38
@Manishearth Manishearth requested a review from a team as a code owner September 4, 2024 21:38
@Manishearth
Copy link
Member Author

Ready for review. I think this is the last large part of FFI future-proofing.

ffi/capi/src/casemap.rs Outdated Show resolved Hide resolved
@@ -77,7 +70,7 @@ pub mod ffi {
secondary_group_size: u8,
min_group_size: u8,
digits: &[DiplomatChar],
grouping_strategy: FixedDecimalGroupingStrategy,
grouping_strategy: Option<FixedDecimalGroupingStrategy>,
Copy link
Member

Choose a reason for hiding this comment

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

I think it's inconsistent to not have an options bag on some APIs, when the Rust API takes an options bag. Everywhere you call Options::default() in a constructor it should really take a bag.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, perhaps we should tweak this

@Manishearth Manishearth merged commit 130d2f7 into unicode-org:main Sep 5, 2024
28 checks passed
@Manishearth Manishearth deleted the ffi-option branch September 5, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants