This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
Remove the time dependency where possible #8100
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cc #7915
The
time
crate is no longer maintained. This PR replaces it withstd::time
where possible. Whereverstrftime
is used, thetime
dependency has been kept because there is no straight-forward replacement yet.In addition to being IMO a positive change, this should also help compile for wasm.
The logic of the code has been preserved, except in a few places where initializing a
u64
to0
has been replaced with initializing anInstant
toInstant::now()
. Since the0
was mostly a place-holder (similar toNone
), the behaviour should be exactly the same in the end.