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

Compilation error when having serde_json as a dependency #59

Closed
jonastar opened this issue Sep 30, 2023 · 2 comments · Fixed by #60
Closed

Compilation error when having serde_json as a dependency #59

jonastar opened this issue Sep 30, 2023 · 2 comments · Fixed by #60

Comments

@jonastar
Copy link
Contributor

error[E0283]: type annotations needed
  --> /home/jonas/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_replicon-0.11.0/src/client.rs:57:29
   |
57 |                         let end_pos = message.len().try_into().unwrap();
   |                             ^^^^^^^
...
85 |                         if cursor.position() == end_pos {
   |                                              -- type must be known at this point
   |
   = note: multiple `impl`s satisfying `u64: PartialEq<_>` found in the following crates: `core`, `serde_json`:
           - impl PartialEq for u64;
           - impl PartialEq<serde_json::value::Value> for u64;
help: consider giving `end_pos` an explicit type
   |
57 |                         let end_pos: /* Type */ = message.len().try_into().unwrap();
   |                                    ++++++++++++

Note that serde_json is included with default bevy features (bevy_gltf)

@Shatur
Copy link
Contributor

Shatur commented Sep 30, 2023

Doesn't happen on CI. How can I reproduce it?

@Shatur
Copy link
Contributor

Shatur commented Sep 30, 2023

Got it, just adding bevy_gltf to deps reproduces the issue.

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 a pull request may close this issue.

2 participants