Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Replace timestamp_checked_add with SystemTime::checked_add when available in rustc #10406

Closed
niklasad1 opened this issue Feb 23, 2019 · 0 comments · Fixed by #10383
Closed

Replace timestamp_checked_add with SystemTime::checked_add when available in rustc #10406

niklasad1 opened this issue Feb 23, 2019 · 0 comments · Fixed by #10383
Labels
P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.

Comments

@niklasad1
Copy link
Collaborator

niklasad1 commented Feb 23, 2019

We have our own implementation of SystemTime::checked_add because it is unstable until Rust 1.34.0

Thus, when Rust 1.34.0 we should remove that implementation alternatively provide both via feature flag timestamp_checked_add to make parity compile with older versions than Rust 1.34

I have a pending PR #10383 in regard to this which may redundant and it could be closed if we remove our helpers completely but there are some additional checked_add operations that could be extracted to a separate if that is the case

@niklasad1 niklasad1 added P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. labels Feb 23, 2019
@niklasad1 niklasad1 changed the title Replace timestamp_checked_add with SystemTime::checked_add when Rust 1.33.0 Replace timestamp_checked_add with SystemTime::checked_add when available in rustc Mar 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P5-sometimesoon 🌲 Issue is worth doing soon. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant