-
Notifications
You must be signed in to change notification settings - Fork 546
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
UTC Offset is not Send (cannot send DateTime across mps::channel) #25
Comments
Thank you for reporting. Chrono 0.2.3 fixed this issue. |
erickt
added a commit
to erickt/chrono
that referenced
this issue
Mar 7, 2024
Fuchsia is doing an audit of chrono 0.4.34, and we noticed an unncessary unsafe of `Send` for `DateTime`. While it's valid since `Tz::Offset` is `Send`, and `NaiveDateTime` only has `u32` fields, there's a potential hazard if `NaiveDateTime` ever grows unsendable fields (unlikely as that is). This (and the `Copy` impl) were added 9 years ago to fix chronotope#25, which stemmed from early versions of associate traits not working properly with auto-traits. This has since been fixed, and is no longer necessary with the MSRV 1.61.0.
erickt
added a commit
to erickt/chrono
that referenced
this issue
Mar 7, 2024
Fuchsia is doing an audit of chrono 0.4.34, and we noticed an unncessary unsafe of `Send` for `DateTime`. While it's valid since `Tz::Offset` is `Send`, and `NaiveDateTime` only has `u32` fields, there's a potential hazard if `NaiveDateTime` ever grows unsendable fields (unlikely as that is). This (and the `Copy` impl) were added 9 years ago to fix chronotope#25, which stemmed from early versions of associate traits not working properly with auto-traits. This has since been fixed, and is no longer necessary with the MSRV 1.61.0.
djc
pushed a commit
that referenced
this issue
Mar 7, 2024
Fuchsia is doing an audit of chrono 0.4.34, and we noticed an unncessary unsafe of `Send` for `DateTime`. While it's valid since `Tz::Offset` is `Send`, and `NaiveDateTime` only has `u32` fields, there's a potential hazard if `NaiveDateTime` ever grows unsendable fields (unlikely as that is). This (and the `Copy` impl) were added 9 years ago to fix #25, which stemmed from early versions of associate traits not working properly with auto-traits. This has since been fixed, and is no longer necessary with the MSRV 1.61.0.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a struct with a
DateTime<UTC>
field that I would like to send across a channel, like this:But when I want to create the channel,
rustc
complains thatNow
Send
is easily the part of Rust I understand the least, but I would have expected a DateTime object to be "sendable".The text was updated successfully, but these errors were encountered: