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

Library should publicly export heapless #52

Closed
ryan-summers opened this issue Apr 28, 2021 · 1 comment · Fixed by #53
Closed

Library should publicly export heapless #52

ryan-summers opened this issue Apr 28, 2021 · 1 comment · Fixed by #53

Comments

@ryan-summers
Copy link
Member

Currently, if the user application and serde-json-core are using different versions of heapless, the compiler may throw strange errors:

(Example here, app uses heapless 0.6.0, serde-json-core 0.2.0)

error[E0308]: mismatched types
  --> src\net\router.rs:54:24
   |
54 |         self.message = serde_json_core::to_vec(&response).unwrap();
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected struct `heapless::Vec`, found struct `heapless::vec::Vec`
   |
   = note: expected struct `heapless::Vec<u8, UInt<UInt<UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>, B0>, B0>>`
              found struct `heapless::vec::Vec<u8, _>`
   = note: perhaps two different versions of crate `heapless` are being used?

We should likely be publicly using the heapless types here to allow external users to sync up exactly with the version of heapless the library is using.

@ryan-summers
Copy link
Member Author

Also, the heapless version we are depending on here is not recommended for further use due to a security vulnerability found. We should likely update the heapless version as well.

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.

1 participant