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

to_rfc2822 can panic #1225

Closed
leontoeides opened this issue Aug 24, 2023 · 2 comments
Closed

to_rfc2822 can panic #1225

leontoeides opened this issue Aug 24, 2023 · 2 comments

Comments

@leontoeides
Copy link

leontoeides commented Aug 24, 2023

to_rfc2822 panics if I provide a MAX_UTC or MIN_UTC date/time. Maybe the date/time could be saturated to what RFC2822 can express? Return a Result? Add an _opt equivalent and deprecate the panicking one? Also, maybe provide MIN_RFC2822_UTC and MAX_RFC2822_UTC type constants?

cause = "writing rfc2822 datetime to string should never fail: Error"
method = "Panic"
@pitdicker
Copy link
Collaborator

Should get fixed with #1144.

@leontoeides
Copy link
Author

Good news! Thank you sir. I swear, I searched for an existing issue first :-)

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

No branches or pull requests

2 participants