yoshidan / google-cloud-rust

Google Cloud Client Libraries for Rust.
MIT License
243 stars 87 forks source link

Error on rfc3339 for serde #189

Closed iammichiel closed 1 year ago

iammichiel commented 1 year ago

Hi there,

I am trying to setup the CloudStorage client but I have the following error when trying out the library (copy-pasted the upload example).

Compilling with cargo run gives the following error :

    |
146 |     #[serde(default, with = "time::serde::rfc3339::option")]
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `rfc3339` in `serde`

Am I missing something?

iammichiel commented 1 year ago

Okay, so got this fixed. No idea what went wrong. This is how I fixed it :

EDIT : So actually, it was the rust-edition that was the issue. Switching from 2018 to 2021 fixed the problem. 🤦 AS noted here, switching the edition, changes the default dependency resolver : https://doc.rust-lang.org/cargo/reference/resolver.html#resolver-versions