Commit graph

7 commits

Author SHA1 Message Date
Sebastian Dröge 9a059583c9 Run everything through rustfmt 2018-11-07 23:59:08 +02:00
François Laignel 68263ffc7d Buffer: serde: add a TODO for a future better design attempt
Serialization and deserialization are asymetrical: ser uses string literals
and de uses a dedicated `struct`, leading to possible inconsistencies.

The idea is to rely on a single `struct` for both ser and de. The only
problem is that, in order to avoid unneeded copies, `buffer` requires an owned
`ByteBuf` for de and a borrowed `Bytes` for ser. `Either` could help adapting
to both situations.
2018-07-30 23:18:30 +03:00
François Laignel 6bda3ef174 serde: add roundtrip tests
This allows making sure serialization and deserialization are in sync for
types with asymetrical implementations.
2018-07-30 23:18:30 +03:00
François Laignel ab9cd29bd6 serde: fmt pass
Note: clippy didn't raise any warning
2018-07-30 23:18:30 +03:00
François Laignel d856fedf06 Buffer: ser: don't panick if not readable 2018-07-30 23:18:30 +03:00
François Laignel 693121bc55 Buffer: fix instanstiation during deserialization 2018-07-30 23:18:30 +03:00
François Laignel 90b046fbcf serde: separate serde impl and tests from base module
+ fix erroneous `datetime` instead of `buffer` in `BufferRef::serialize`
+ remove ser/de for `Value`s with types `ULong` & `ILong`
2018-07-30 23:18:30 +03:00