summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-05-15 14:39:51 +0200
committerMatthias Beyer <mail@beyermatthias.de>2021-05-15 14:49:00 +0200
commit7ffa3581ccf15dd339873078faf6776a9598f4ea (patch)
tree50f815d8a645b54e1b7375d7d6ede82e32b68c31
parent70c503af8b3cb3d73bbbea673bb49460df318e5e (diff)
Fix: json5 does not need serde_derive
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--Cargo.toml3
-rw-r--r--src/file/format/json5.rs4
-rw-r--r--src/lib.rs2
3 files changed, 3 insertions, 6 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 929f7ff..35b1ab3 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,7 +20,7 @@ json = ["serde_json"]
yaml = ["yaml-rust"]
hjson = ["serde-hjson"]
ini = ["rust-ini"]
-json5 = ["json5_rs", "serde_derive"]
+json5 = ["json5_rs"]
[dependencies]
lazy_static = "1.0"
@@ -34,7 +34,6 @@ serde-hjson = { version = "0.9", default-features = false, optional = true }
rust-ini = { version = "0.17", optional = true }
ron = { version = "0.6", optional = true }
json5_rs = { version = "0.3", optional = true, package = "json5" }
-serde_derive = { version = "1.0.8", optional = true }
[dev-dependencies]
serde_derive = "1.0.8"
diff --git a/src/file/format/json5.rs b/src/file/format/json5.rs
index 320e574..fa7ff1b 100644
--- a/src/file/format/json5.rs
+++ b/src/file/format/json5.rs
@@ -1,12 +1,10 @@
-use serde_derive::Deserialize;
-
use std::collections::HashMap;
use std::error::Error;
use crate::error::{ConfigError, Unexpected};
use crate::value::{Value, ValueKind};
-#[derive(Deserialize, Debug)]
+#[derive(serde::Deserialize, Debug)]
#[serde(untagged)]
pub enum Val {
Null,
diff --git a/src/lib.rs b/src/lib.rs
index 986f36a..0725189 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -24,7 +24,7 @@
#[macro_use]
extern crate serde;
-#[cfg(any(test, feature = "json5"))]
+#[cfg(test)]
extern crate serde_derive;
extern crate nom;