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:
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user