From 5b4f19c01fe019db0cb9c258ef580354430809aa Mon Sep 17 00:00:00 2001 From: "Tobin C. Harding" Date: Fri, 3 Feb 2023 10:20:57 +1100 Subject: [PATCH] hashes: Improve std/alloc features Improve std/alloc features by doing: - Fix incorrect feature enabling: "std" should enable "internals/std" not "internals/alloc". - Put the "alloc" feature under the "std" feature, same as in other crates. - Remove the comment, devs should understand what dependencies are for. We don't have comments everywhere else so we don't really need this one. --- hashes/Cargo.toml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hashes/Cargo.toml b/hashes/Cargo.toml index c66c57d2..f41c9d22 100644 --- a/hashes/Cargo.toml +++ b/hashes/Cargo.toml @@ -14,12 +14,9 @@ exclude = ["tests", "contrib"] [features] default = ["std"] -std = ["internals/alloc"] -schemars = ["actual-schemars", "dyn-clone"] -# If you disable std, you can still use a Write trait via the core2 feature. -# You can also use ToHex via the alloc feature, as it requires Vec/String. -# And you can still just disable std by disabling default features, without enabling these two. +std = ["internals/std"] alloc = ["internals/alloc"] +schemars = ["actual-schemars", "dyn-clone"] serde-std = ["serde/std"] [dependencies]