From 877d64afb6e7cdc6a0ad461a3577365caf010deb Mon Sep 17 00:00:00 2001 From: Rain Date: Sun, 24 Sep 2023 18:58:36 -0700 Subject: [PATCH] Use weak features for preserve_order Currently, `preserve_order` causes the toml, serde_json and ron dependencies to be enabled. This can be avoided by using cargo's support for [weak features]. [weak features]: https://rust-lang.github.io/rfcs/3143-cargo-weak-namespaced-features.html Weak features were stabilized in Rust 1.60 so there are no MSRV concerns. I think this probably is a breaking change since it's possible some downstream users weren't enabling support explicitly. Signed-off-by: Rain --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 36267375..294956c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ yaml = ["yaml-rust"] ini = ["rust-ini"] json5 = ["json5_rs", "serde/derive"] convert-case = ["convert_case"] -preserve_order = ["indexmap", "toml/preserve_order", "serde_json/preserve_order", "ron/indexmap"] +preserve_order = ["indexmap", "toml?/preserve_order", "serde_json?/preserve_order", "ron?/indexmap"] async = ["async-trait"] [dependencies]