Skip to content

chore: Update Cargo.lock for security and refactor deprecated chrono functions#1045

Merged
ghaith merged 4 commits intoPLC-lang:masterfrom
teksturi:cargo_update
Dec 1, 2023
Merged

chore: Update Cargo.lock for security and refactor deprecated chrono functions#1045
ghaith merged 4 commits intoPLC-lang:masterfrom
teksturi:cargo_update

Conversation

@teksturi
Copy link
Copy Markdown
Contributor

Update is made by Ghaith Hachem 1. I removed deprecated warnings so
build will success. Update was made because Rustix needs secyrity update.

@volsa volsa changed the title fix: Update Cargo.lock for security and refactor debrecated chore: Update Cargo.lock for security and refactor deprecated chrono functions Nov 29, 2023
@ghaith
Copy link
Copy Markdown
Collaborator

ghaith commented Dec 1, 2023

@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.

ghaith and others added 4 commits December 1, 2023 12:48
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.
@ghaith ghaith merged commit 6a1b19a into PLC-lang:master Dec 1, 2023
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

Successfully merging this pull request may close these issues.

2 participants