Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support packed CBOR maps #40

Closed
wants to merge 4 commits into from
Closed

Support packed CBOR maps #40

wants to merge 4 commits into from

Conversation

kim
Copy link

@kim kim commented Feb 19, 2020

This is a proposal to add support for "packed" CBOR map keys, as supported by the underlying serde_cbor crate.

Comment on lines 134 to 138
let j = if self.packed {
serde_cbor::to_vec(&data)?
} else {
serde_cbor::ser::to_vec_packed(&data)?
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you made a mistake and invert the branches?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah... 🤦

@kim
Copy link
Author

kim commented Mar 3, 2020

Only now I came across pyfisch/cbor#173, which made me realise that this feature is not very useful (I can use repr(u8) for enums without data). Feel free to close.

@matthunz matthunz closed this Mar 5, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants