From 5131174cde41c5eb64d24191f6d8b3de8a573c6c Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Sun, 23 Apr 2023 17:43:48 +0300 Subject: [PATCH] #16 serde is optional --- Cargo.lock | 14 -------------- Cargo.toml | 2 +- src/lib.rs | 1 + 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a85bff5..e86eecc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -221,20 +221,6 @@ name = "serde" version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.160" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] [[package]] name = "simple_logger" diff --git a/Cargo.toml b/Cargo.toml index 9cd6dbd..bdba0ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ keywords = ["memory", "map"] categories = ["data-structures", "memory-management"] [dependencies] -serde = { version = "1.0.160", features = ["derive"] } +serde = { version = "1.0.160", optional = true, default-features = false } [dev-dependencies] anyhow = "1.0.70" diff --git a/src/lib.rs b/src/lib.rs index 7995f5b..beadafa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,6 +53,7 @@ mod index; mod iterators; mod map; mod pair; +#[cfg(feature = "serde")] mod serialization; /// A pair in the Map.