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

UtcOffsetCalculator should have a borrowed variant #6237

Open
sffc opened this issue Mar 6, 2025 · 1 comment
Open

UtcOffsetCalculator should have a borrowed variant #6237

sffc opened this issue Mar 6, 2025 · 1 comment
Labels
2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones S-small Size: One afternoon (small bug fix or enhancement)

Comments

@sffc
Copy link
Member

sffc commented Mar 6, 2025

I found this because it's confusing that ZonedDateTime::try_from_str takes one borrowed thing and one thing by value:

pub fn try_from_str(
    ixdtf_str: &str,
    calendar: A,
    iana_parser: IanaParserBorrowed<'_>,
    offset_calculator: &UtcOffsetCalculator,
)

CC @robertbastian

@sffc sffc added 2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones labels Mar 6, 2025
@sffc sffc added this to the ICU4X 2.0 Stretch ⟨P2⟩ milestone Mar 6, 2025
@sffc sffc added the needs-approval One or more stakeholders need to approve proposal label Mar 6, 2025
@sffc
Copy link
Member Author

sffc commented Mar 6, 2025

  • @robertbastian What was the litmus test?
  • @sffc If the operation is fairly lightweight relative to the operation
  • @Manishearth We care about destructors, too
  • @sffc Another thing is it allows us to have an optional alloc feature
  • @robertbastian It seems like this doesn't really pass the litmus test so it should be a stretch
  • @Manishearth I think it's fine if someone asks for it

Conclusion: add this issue to 2.0-stretch

@sffc sffc added S-small Size: One afternoon (small bug fix or enhancement) and removed needs-approval One or more stakeholders need to approve proposal labels Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0-breaking Changes that are breaking API changes C-datetime Component: datetime, calendars, time zones S-small Size: One afternoon (small bug fix or enhancement)
Projects
None yet
Development

No branches or pull requests

1 participant