Skip to content

Commit

Permalink
Allow using serde feature in no_std environment (#385)
Browse files Browse the repository at this point in the history
When `serde` is used, it would enable its default feature `std`.
This of course breaks no_std build.

Fix this by disabling serde's default features. This should work for
both serde + std and serde + no_std case.
  • Loading branch information
xu-cheng committed May 22, 2020
1 parent e8fa251 commit 9f40abc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -25,7 +25,7 @@ default = ["std"]
std = []

[dependencies]
serde = { version = "1.0", optional = true }
serde = { version = "1.0", optional = true, default-features = false, features = ["alloc"] }

[dev-dependencies]
serde_test = "1.0"
Expand Down

0 comments on commit 9f40abc

Please sign in to comment.