From 9e4da2b6cc8dffe3e844e23d9c2da27d64965581 Mon Sep 17 00:00:00 2001 From: Cheng XU <3105373+xu-cheng@users.noreply.github.com> Date: Thu, 21 May 2020 19:19:46 -0700 Subject: [PATCH] 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. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"