-
Notifications
You must be signed in to change notification settings - Fork 99
Implement 'to_vec' and 'from_slice' for no_std #147
Conversation
4467b7b
to
178d5b5
Compare
Unfortunately this does not build with Rust 1.31.0 because the |
Is it correct that with this change alloc is always used? |
I think so, though I’m not super familiar with
Ok. It might be best then to put this behind a feature flag. This also aligns with serde and retains compatibility with 1.31.0. I’ll update the PR accordingly. |
2fd5c95
to
6f7020a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just left one tiny nit in the interest of concise documentation, feel free to leave as is if you disagree.
LGTM! 😄
We implement `to_vec()` and `from_slice()` in a `no_std` environment to simplify serialization. For this we require the `alloc` feature flag.
6f7020a
to
053b068
Compare
Implemented in pyfisch/cbor#147.
@geigerzaehler By the way this PR broke Travis CI. 😉 See: #154 and https://stackoverflow.com/questions/58249675/travis-ci-fails-to-parse-travis-yml |
Sorry and thanks for fixing. I was wondering where the green checkmark was. To bad Travis does not fail the build when it can’t parse |
Update .travis.yml to include tests if the crate builds with the `alloc` feature enabled. These scripts are only executed if the rust version is != 1.31.0. These changes were originally included in #147 but with incorrect YAML syntax.
We implement
serde_cbor::to_vec()
andserde_cbor::from_slice()
in ano_std
environment to simplify serialization. For this we usealloc::vec::Vec
.