aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Cheng XU <3105373+xu-cheng@users.noreply.github.com> 2020-05-21 19:19:46 -0700
committerGravatar GitHub <noreply@github.com> 2020-05-22 11:19:46 +0900
commit9f40abc12a72aed5cb1ac37d769eb39b2a9d9a85 (patch)
tree3a03c7e268d3eb6ee555bcc86676c910bd74df73
parente8fa2511ffda2412244275e4287b5c59ce4dfc26 (diff)
downloadbytes-9f40abc12a72aed5cb1ac37d769eb39b2a9d9a85.tar.gz
bytes-9f40abc12a72aed5cb1ac37d769eb39b2a9d9a85.tar.zst
bytes-9f40abc12a72aed5cb1ac37d769eb39b2a9d9a85.zip
Allow using serde feature in no_std environment (#385)
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.
-rw-r--r--Cargo.toml2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 257e788..79b6773 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"