Add 'serde' feature for serializing and deserializing ArrayVec and ArrayString.

This implements serde support under the optional 'serde' feature, and adds unit tests to test said support.
https://serde.rs/unit-testing.html used as a guide for the unit tests - using 'serde_test' makes for much
less boilerplate here, but it does require that the project have a non-optional dev dependency on 'serde_test'.
This commit is contained in:
David Ross
2017-06-08 01:30:35 -07:00
parent adf08656cc
commit 21cd20ff26
5 changed files with 171 additions and 1 deletions
+8
View File
@@ -19,6 +19,14 @@ version = "0.1.8"
path = "nodrop"
default-features = false
[dependencies.serde]
version = "1.0"
optional = true
default-features = false
[dev-dependencies.serde_test]
version = "1.0"
[features]
default = ["std"]
std = ["odds/std", "nodrop/std"]