Skip to content

Conversation

@MathiasKoch
Copy link
Collaborator

@MathiasKoch MathiasKoch commented Dec 11, 2020

Adds ser/de for the following types:

  • unit types, i.e () & struct Test;
  • newtype structs, ser/de'ing the underlying value
  • Variants:
    • The newtype_variant format, i.e Variant(u32)
    • The struct_variant format, i.e Variant { x: u32, y: u16 }
  • Fixes tests and clippy warnings

This is just #25 rebased on master

MabezDev and others added 6 commits February 21, 2020 10:58
ser:
    * Added newtype serialization (as underlying value)
    * Added newtype_variant serialization (as object)
    * Added unit serialization (as null)

der:
    * Added unit de
    * Added newtype_struct
* Implement VariantAccess for non unit enums
* Add newtype_variant & struct_variant deserialization
* Basic tests for both
* Remove Unreachable impl for SerializationStructVariant
@MathiasKoch
Copy link
Collaborator Author

Hmm.. Not sure why the CI fails here? @eldruin ?

@MathiasKoch
Copy link
Collaborator Author

Ahh...
error[E0658]: non exhaustive is an experimental feature

How should that be handled? Go back to the manual one, and exclude it from clippy checks?

@MathiasKoch
Copy link
Collaborator Author

MathiasKoch commented Dec 11, 2020

I think it might be a matter of raising MSRV?
non_exhaustive was introduced to stable in 1.40.0

@eldruin would you be okay with me raising MSRV to 1.40.0?

@eldruin
Copy link
Member

eldruin commented Dec 11, 2020

I would be OK with raising the MSRV to 1.40.0.

@MathiasKoch MathiasKoch merged commit 2a97b87 into rust-embedded-community:master Dec 11, 2020
@MathiasKoch MathiasKoch deleted the PR25 branch December 11, 2020 09:12
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.

3 participants