Skip to content
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

Migrate off deprecated chrono interfaces #107

Open
nickgarfield opened this issue Dec 5, 2022 · 3 comments
Open

Migrate off deprecated chrono interfaces #107

nickgarfield opened this issue Dec 5, 2022 · 3 comments
Labels
good first issue Good for newcomers

Comments

@nickgarfield
Copy link
Member

nickgarfield commented Dec 5, 2022

When building, we get a few of these warnings. Let's migrate from from_timestamp() to from_timestamp_opt().

warning: use of deprecated associated function `chrono::NaiveDateTime::from_timestamp`: use `from_timestamp_opt()` instead
   --> src/state/thread.rs:557:28
    |
557 |             NaiveDateTime::from_timestamp(after, 0),
    |                            ^^^^^^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default
@nickgarfield nickgarfield added the good first issue Good for newcomers label Dec 5, 2022
@nickgarfield nickgarfield changed the title Migrate off of deprecated chrono interfaces Migrate off deprecated chrono interfaces Dec 5, 2022
@Rhovian
Copy link

Rhovian commented Dec 6, 2022

@nickgarfield not seeing these warnings anywhere, steps to reproduce?

env: rustc 1.65.0 (897e37553 2022-11-02)

@nickgarfield
Copy link
Member Author

nickgarfield commented Dec 6, 2022

I was seeing these when running our "build all" script. It does a cargo build, anchor build, and then sets up the localnet configs.

./scripts/build-all.sh . 

@nickgarfield
Copy link
Member Author

Update: these warnings are only thrown when using the Rust nightly toolchain. No need for an immediate fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants