From 7aca693341db712cc339e8f60c0a21d38c56b1f8 Mon Sep 17 00:00:00 2001 From: Cheng XU Date: Thu, 30 Apr 2020 00:37:16 -0700 Subject: [PATCH] Allow using serde feature in no_std environment 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 257e78858..79b6773b9 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"