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

Update dependencies documentation to include (probably) required serde in time crate #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

0ba100
Copy link

@0ba100 0ba100 commented Sep 13, 2024

This is probably only required when using the time feature. I came across the following error without it:

error[E0277]: the trait bound `PrimitiveDateTime: Serialize` is not satisfied
    --> /workspace/target/debug/build/db-d6aaecb6f4eed2cf/out/cornucopia.rs:7:102
     |
7    | ...utures; use cornucopia_async::GenericClient;#[derive(serde::Serialize, Debug, Clone,...
     |                                                         ^^^^^^^^^^^^^^^^ the trait `Serialize` is not implemented for `PrimitiveDateTime`
8    | ...n : String,pub start_time : time::PrimitiveDateTime,}pub struct EventBorrowed<'a> { ...
     |               --- required by a bound introduced by this call
     |
     = note: for local types consider adding `#[derive(serde::Serialize)]` to your `PrimitiveDateTime` type
     = note: for types from other crates check whether the crate offers a `serde` feature flag
     = help: the following other types implement trait `Serialize`:
               &'a T
               &'a mut T
               ()
               (T,)
               (T0, T1)
               (T0, T1, T2)
               (T0, T1, T2, T3)
               (T0, T1, T2, T3, T4)
             and 134 others
note: required by a bound in `events::_::_serde::ser::SerializeStruct::serialize_field`
    --> /usr/local/cargo/registry/src/index.crates.io-6f17d22bba15001f/serde-1.0.210/src/ser/mod.rs:1867:21
     |
1865 |     fn serialize_field<T>(&mut self, key: &'static str, value: &T) -> Result<(), Self::...
     |        --------------- required by a bound in this associated function
1866 |     where
1867 |         T: ?Sized + Serialize;
     |                     ^^^^^^^^^ required by this bound in `SerializeStruct::serialize_field`
     = note: this error originates in the derive macro `serde::Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0277`.

it's only a small change but might help guide some folks.

include serde in time crate
Copy link

netlify bot commented Sep 13, 2024

Deploy Preview for cornucopia-rs ready!

Name Link
🔨 Latest commit 8b8e206
🔍 Latest deploy log https://app.netlify.com/sites/cornucopia-rs/deploys/66e4c5f3c21f4b0008dc753d
😎 Deploy Preview https://deploy-preview-20--cornucopia-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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.

1 participant