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

Mapping functions between DateSymbolsV1, TimeSymbolsV1, and neo symbols #4187

Merged
merged 13 commits into from
Oct 21, 2023

Conversation

sffc
Copy link
Member

@sffc sffc commented Oct 20, 2023

Part of #3598

Depends on #4188
Depends on #4189

Manishearth
Manishearth previously approved these changes Oct 20, 2023
Copy link
Member

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

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

would be cool if we could design this as a wrapper provider but this is fine

@dpulls
Copy link

dpulls bot commented Oct 20, 2023

🎉 All dependencies have been resolved !

@Manishearth Manishearth marked this pull request as ready for review October 20, 2023 22:57
@Manishearth Manishearth marked this pull request as draft October 20, 2023 22:57
@sffc sffc marked this pull request as ready for review October 20, 2023 23:41
@sffc sffc requested review from Manishearth and removed request for zbraniecki, gregtatum and nordzilla October 20, 2023 23:41
@sffc sffc changed the title Mapping functions between DateSymbolsV1 and neo symbols Mapping functions between DateSymbolsV1, TimeSymbolsV1, and neo symbols Oct 20, 2023
.get_aux()
.and_then(|aux| aux.iter().next())
.ok_or_else(|| {
DataError::custom("Expected aux key")
Copy link
Member

Choose a reason for hiding this comment

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

nit (optional): potentially error when there are two subtags

Copy link
Member Author

Choose a reason for hiding this comment

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

return Ok(result.into());
}
let result = match subtag {
STADLN_SHRT | FORMAT_SHRT => payload.weekdays.format.short.as_ref(),
Copy link
Member

Choose a reason for hiding this comment

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

praise: nice work with the match statements, this is a decent flow

@sffc sffc merged commit e0849fd into unicode-org:main Oct 21, 2023
@sffc sffc deleted the transform-neo branch October 21, 2023 00:21
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