chore: Update Cargo.lock for security and refactor deprecated chrono functions#1045
Merged
ghaith merged 4 commits intoPLC-lang:masterfrom Dec 1, 2023
Merged
chore: Update Cargo.lock for security and refactor deprecated chrono functions#1045ghaith merged 4 commits intoPLC-lang:masterfrom
ghaith merged 4 commits intoPLC-lang:masterfrom
Conversation
2bedc69 to
7bc8349
Compare
Collaborator
|
@teksturi I tried to push a merge to your branch but was unable to. Could you please enable the option on this PR for maintainers to push changes, or could you please run cargo update once more and then merge the newest master? This way we could merge this PR soon as well. |
Rustix needed an update, ran cargo update to address the issue
timestamp_nanos() is deprecated and we can replace it very easily in unittests with timestamp_nanos_opt().unwrap(). These are unittests and we do not except timestamp_nanos_opt() to fail so unwrap is totally ok.
timestamp_nanos() is deprecated and we should replace it with timestamp_nanos_opt(). Before it would just panic if range was not in between 1677-09-21T00:12:44.0 and 2262-04-11T23:47:16.854775804. Now we can decide what to do in which situation. I tried to follow what ever error stategy function did before.
Function from_utc is deprecated. I choose to use TimeZone::from_utc_datetime which is pretty similar.
7bc8349 to
c78d18f
Compare
ghaith
approved these changes
Dec 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Update is made by Ghaith Hachem 1. I removed deprecated warnings so
build will success. Update was made because Rustix needs secyrity update.